extension

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMutatePath

func GenerateMutatePath(apiPath string, gvk schema.GroupVersionKind) string

func GenerateValidatePath

func GenerateValidatePath(apiPath string, gvk schema.GroupVersionKind) string

func WithCustomDefaulter

func WithCustomDefaulter(obj runtime.Object, defaulter CustomDefaulter) *admission.Webhook

WithCustomDefaulter creates a new Webhook for a CustomDefaulter interface.

func WithCustomMutator

func WithCustomMutator(obj runtime.Object, mutator CustomMutator) *admission.Webhook

func WithCustomValidator

func WithCustomValidator(obj runtime.Object, validator CustomValidator) *admission.Webhook

WithCustomValidator creates a new Webhook for validating the provided type.

Types

type CustomDefaulter

type CustomDefaulter interface {
	Default(ctx context.Context, obj runtime.Object) error
}

CustomDefaulter defines functions for setting defaults on resources.

type CustomMutator

type CustomMutator interface {
	MutateOnCreate(ctx context.Context, obj runtime.Object) error
	MutateOnUpdate(ctx context.Context, oldObj, newObj runtime.Object) error
}

type CustomValidator

type CustomValidator interface {
	ValidateCreate(ctx context.Context, obj runtime.Object) error
	ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) error
	ValidateDelete(ctx context.Context, obj runtime.Object) error
}

CustomValidator defines functions for validating an operation.

Jump to

Keyboard shortcuts

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