conversion

package
v0.24.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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, v1beta1ConverterFunc V1Beta1ReviewConverterFunc, v1ConverterFunc V1ReviewConverterFunc) http.Handler

NewReviewWebhookHandler creates a handler that delegates the review conversion to the provided ReviewConverterFunc.

func StartConversionWebhookServer

func StartConversionWebhookServer(handler http.Handler) (func(), *apiextensionsv1.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 V1Beta1ReviewConverterFunc added in v0.16.4

type V1Beta1ReviewConverterFunc func(review *apiextensionsv1beta1.ConversionReview) (*apiextensionsv1beta1.ConversionReview, error)

V1Beta1ReviewConverterFunc converts an entire ConversionReview.

type V1ReviewConverterFunc added in v0.16.4

type V1ReviewConverterFunc func(review *apiextensionsv1.ConversionReview) (*apiextensionsv1.ConversionReview, error)

V1ReviewConverterFunc converts an entire ConversionReview.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL