Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Metrics = newWebhookConversionMetrics()
)
Functions ¶
This section is empty.
Types ¶
type CRConverterFactory ¶
type CRConverterFactory struct {
// contains filtered or unexported fields
}
CRConverterFactory is the factory for all CR converters.
func NewCRConverterFactory ¶
func NewCRConverterFactory(serviceResolver webhook.ServiceResolver, authResolverWrapper webhook.AuthenticationInfoResolverWrapper) (*CRConverterFactory, error)
NewCRConverterFactory creates a new CRConverterFactory
func (*CRConverterFactory) NewConverter ¶
func (m *CRConverterFactory) NewConverter(crd *apiextensionsv1.CustomResourceDefinition) (safe, unsafe runtime.ObjectConvertor, err error)
NewConverter returns a new CR converter based on the conversion settings in crd object.
type WebhookConversionErrorType ¶
type WebhookConversionErrorType string
const ( WebhookConversionCallFailure WebhookConversionErrorType = "webhook_conversion_call_failure" WebhookConversionMalformedResponseFailure WebhookConversionErrorType = "webhook_conversion_malformed_response_failure" WebhookConversionPartialResponseFailure WebhookConversionErrorType = "webhook_conversion_partial_response_failure" WebhookConversionInvalidConvertedObjectFailure WebhookConversionErrorType = "webhook_conversion_invalid_converted_object_failure" WebhookConversionNoObjectsReturnedFailure WebhookConversionErrorType = "webhook_conversion_no_objects_returned_failure" )
type WebhookConversionMetrics ¶
type WebhookConversionMetrics struct {
// contains filtered or unexported fields
}
WebhookConversionMetrics instruments webhook conversion with prometheus metrics.
func (*WebhookConversionMetrics) ObserveWebhookConversionFailure ¶
func (m *WebhookConversionMetrics) ObserveWebhookConversionFailure(ctx context.Context, elapsed time.Duration, errorType WebhookConversionErrorType)
Observe failure with failure type
func (*WebhookConversionMetrics) ObserveWebhookConversionSuccess ¶
func (m *WebhookConversionMetrics) ObserveWebhookConversionSuccess(ctx context.Context, elapsed time.Duration)
Observe successful request
Click to show internal directories.
Click to hide internal directories.