Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Metrics = newConversionWebhookMetrics()
)
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 ConversionWebhookErrorType ¶ added in v0.28.0
type ConversionWebhookErrorType string
const ( ConversionWebhookCallFailure ConversionWebhookErrorType = "conversion_webhook_call_failure" ConversionWebhookMalformedResponseFailure ConversionWebhookErrorType = "conversion_webhook_malformed_response_failure" ConversionWebhookPartialResponseFailure ConversionWebhookErrorType = "conversion_webhook_partial_response_failure" ConversionWebhookInvalidConvertedObjectFailure ConversionWebhookErrorType = "conversion_webhook_invalid_converted_object_failure" ConversionWebhookNoObjectsReturnedFailure ConversionWebhookErrorType = "conversion_webhook_no_objects_returned_failure" )
type ConversionWebhookMetrics ¶ added in v0.28.0
type ConversionWebhookMetrics struct {
// contains filtered or unexported fields
}
ConversionWebhookMetrics instruments webhook conversion with prometheus metrics.
func (*ConversionWebhookMetrics) ObserveConversionWebhookFailure ¶ added in v0.28.0
func (m *ConversionWebhookMetrics) ObserveConversionWebhookFailure(ctx context.Context, elapsed time.Duration, errorType ConversionWebhookErrorType)
Observe failure with failure type
func (*ConversionWebhookMetrics) ObserveConversionWebhookSuccess ¶ added in v0.28.0
func (m *ConversionWebhookMetrics) ObserveConversionWebhookSuccess(ctx context.Context, elapsed time.Duration)
Observe successful request
Click to show internal directories.
Click to hide internal directories.