webhook

package
v0.0.0-...-df8a43a Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWebhook

func RegisterWebhook[T runtime.Object](server ctrlwebhook.Server, resourcePath string, handler Handler[T], s *runtime.Scheme)

RegisterWebhook regist a webhook.Handler to the webhook server

Types

type ExtendedHandler

type ExtendedHandler[T runtime.Object] interface {
	MutateOnCreate(obj T) (err error)
	MutateOnUpdate(oldObj, newObj T) (err error)
}

ExtendedHandler is a handler that can mutate on create and update it works after the defaulting

type Handler

type Handler[T runtime.Object] interface {
	Default(obj T)
	ValidateCreate(obj T) (warnings admission.Warnings, err error)
	ValidateUpdate(oldObj, newObj T) (warnings admission.Warnings, err error)
	ValidateDelete(obj T) (warnings admission.Warnings, err error)
	GetObject() T
}

Jump to

Keyboard shortcuts

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