Documentation
¶
Index ¶
- func ContextGetAdmissionRequest(ctx context.Context) *admission.Request
- func ContextWithAdmissionRequest(ctx context.Context, req admission.Request) context.Context
- func MutatingWebhookForMutator(mutator Mutator) *admission.Webhook
- func ValidatingWebhookForValidator(validator Validator) *admission.Webhook
- type Mutator
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MutatingWebhookForMutator ¶
MutatingWebhookForMutator creates a new mutating Webhook.
func ValidatingWebhookForValidator ¶
ValidatingWebhookForValidator creates a new validating Webhook.
Types ¶
type Mutator ¶
type Mutator interface { // Prototype returns a prototype of Object for this admission request. Prototype(req admission.Request) (runtime.Object, error) // MutateCreate handles Object creation and returns the object after mutation and error if any. MutateCreate(ctx context.Context, obj runtime.Object) (runtime.Object, error) // MutateUpdate handles Object update and returns the object after mutation and error if any. MutateUpdate(ctx context.Context, obj runtime.Object, oldObj runtime.Object) (runtime.Object, error) }
Mutator defines interface for a mutation webHook
type Validator ¶
type Validator interface { // Prototype returns a prototype of Object for this admission request. Prototype(req admission.Request) (runtime.Object, error) // ValidateCreate handles Object creation and returns error if any. ValidateCreate(ctx context.Context, obj runtime.Object) error // ValidateUpdate handles Object update and returns error if any. ValidateUpdate(ctx context.Context, obj runtime.Object, oldObj runtime.Object) error // ValidateDelete handles Object deletion and returns error if any. ValidateDelete(ctx context.Context, obj runtime.Object) error }
Validator defines interface for a validation webHook
Click to show internal directories.
Click to hide internal directories.