defaulting

package
v0.0.0-...-74c4be5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 35 Imported by: 105

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdmissionController

func NewAdmissionController(
	ctx context.Context,
	name, path string,
	handlers map[schema.GroupVersionKind]resourcesemantics.GenericCRD,
	wc func(context.Context) context.Context,
	disallowUnknownFields bool,
	callbacks ...map[schema.GroupVersionKind]Callback,
) *controller.Impl

NewAdmissionController constructs a reconciler

Types

type Callback

type Callback struct {
	// contains filtered or unexported fields
}

Callback is a generic function to be called by a consumer of defaulting.

func NewCallback

func NewCallback(function func(context.Context, *unstructured.Unstructured) error, supportedVerbs ...webhook.Operation) Callback

NewCallback creates a new callback function to be invoked on supported verbs.

type CallbackFunc

type CallbackFunc func(ctx context.Context, unstructured *unstructured.Unstructured) error

CallbackFunc is the function to be invoked.

type OptionFunc

type OptionFunc func(*options)

func WithCallbacks

func WithCallbacks(callbacks map[schema.GroupVersionKind]Callback) OptionFunc

func WithDisallowUnknownFields

func WithDisallowUnknownFields() OptionFunc

func WithPath

func WithPath(path string) OptionFunc

func WithWrapContext

func WithWrapContext(f func(context.Context) context.Context) OptionFunc

Jump to

Keyboard shortcuts

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