Documentation ¶
Index ¶
- func NewObjectConverterWebhookHandler(t *testing.T, converterFunc ObjectConverterFunc) http.Handler
- func NewReviewWebhookHandler(t *testing.T, converterFunc ReviewConverterFunc) http.Handler
- func StartConversionWebhookServer(handler http.Handler) (func(), *apiextensionsv1beta1.WebhookClientConfig, error)
- type ObjectConverterFunc
- type ReviewConverterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewObjectConverterWebhookHandler ¶
func NewObjectConverterWebhookHandler(t *testing.T, converterFunc ObjectConverterFunc) http.Handler
NewObjectConverterWebhookHandler creates a handler that delegates custom resource conversion to the provided ConverterFunc.
func NewReviewWebhookHandler ¶
func NewReviewWebhookHandler(t *testing.T, converterFunc ReviewConverterFunc) http.Handler
NewReviewWebhookHandler creates a handler that delegates the review conversion to the provided ReviewConverterFunc.
func StartConversionWebhookServer ¶
func StartConversionWebhookServer(handler http.Handler) (func(), *apiextensionsv1beta1.WebhookClientConfig, error)
StartConversionWebhookServer starts an http server with the provided handler and returns the WebhookClientConfig needed to configure a CRD to use this conversion webhook as its converter.
Types ¶
type ObjectConverterFunc ¶
type ObjectConverterFunc func(desiredAPIVersion string, customResource runtime.RawExtension) (runtime.RawExtension, error)
ObjectConverterFunc converts a single custom resource to the desiredAPIVersion and returns it or returns an error.
type ReviewConverterFunc ¶
type ReviewConverterFunc func(review apiextensionsv1beta1.ConversionReview) (apiextensionsv1beta1.ConversionReview, error)
ReviewConverterFunc converts an entire ConversionReview.
Click to show internal directories.
Click to hide internal directories.