webhook

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMutatingWebhook

func NewMutatingWebhook(defaulter Defaulter, client client.Client) *admission.Webhook

NewMutatingWebhook creates a new Webhook for Defaulting the provided type.

func NewValidatingWebhook

func NewValidatingWebhook(validator Validator, client client.Client) *admission.Webhook

NewValidatingWebhook creates a new Webhook for validating the provided type.

Types

type Defaulter

type Defaulter interface {
	runtime.Object
	Default(client client.Client)
}

Defaulter defines functions for setting defaults on resources.

type Validator

type Validator interface {
	runtime.Object
	ValidateCreate(client client.Client) error
	ValidateUpdate(old runtime.Object, client client.Client) error
	ValidateDelete(client client.Client) error
}

Validator defines functions for validating an operation.

Jump to

Keyboard shortcuts

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