apiextensions-apiserverk8s.io/apiextensions-apiserver/test/integration/conversion Index | Files

package conversion

import "k8s.io/apiextensions-apiserver/test/integration/conversion"

Index

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

ReviewConverterFunc converts an entire ConversionReview.

Source Files

webhook.go

Version
v0.15.11
Published
Mar 13, 2020
Platform
js/wasm
Imports
14 packages
Last checked
18 seconds ago

Tools for package owners.