Documentation ¶
Index ¶
- func DecodeRawUnstructured(rawObj runtime.RawExtension, rawKind schema.GroupVersionKind) (*unstructured.Unstructured, error)
- func NewCustomMutationWebhook(mutationWebhook MutationInterface) *admission.Webhook
- func NewCustomValidationWebhook(scheme *runtime.Scheme, validationWebhook ValidationInterface) *admission.Webhook
- type Handler
- type Interface
- type MutationInterface
- type PluginChain
- type ValidationInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeRawUnstructured ¶ added in v1.15.0
func DecodeRawUnstructured(rawObj runtime.RawExtension, rawKind schema.GroupVersionKind) (*unstructured.Unstructured, error)
DecodeRawUnstructured decodes a RawExtension object into an unstructured object.
func NewCustomMutationWebhook ¶ added in v1.15.0
func NewCustomMutationWebhook( mutationWebhook MutationInterface, ) *admission.Webhook
func NewCustomValidationWebhook ¶ added in v1.15.0
func NewCustomValidationWebhook( scheme *runtime.Scheme, validationWebhook ValidationInterface, ) *admission.Webhook
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(ops ...admissionv1.Operation) *Handler
type Interface ¶
type Interface interface {
Handles(admissionv1.Operation) bool
}
Interface is the base admission interface
type MutationInterface ¶
type MutationInterface interface { Interface Mutate(ctx context.Context, request admissionv1.AdmissionRequest, obj *unstructured.Unstructured) (err error) }
MutationInterface defines an admission handler that validates requests. It may not perform any kind of mutation.
type PluginChain ¶
type PluginChain []Interface
func (PluginChain) Handles ¶
func (pc PluginChain) Handles(operation admissionv1.Operation) bool
func (PluginChain) Mutate ¶
func (pc PluginChain) Mutate(ctx context.Context, request admissionv1.AdmissionRequest, obj *unstructured.Unstructured) error
func (PluginChain) Validate ¶
func (pc PluginChain) Validate(ctx context.Context, request admissionv1.AdmissionRequest, oldObj, obj runtime.Object) ([]string, error)
type ValidationInterface ¶
type ValidationInterface interface { Interface Validate(ctx context.Context, request admissionv1.AdmissionRequest, oldObj, obj runtime.Object) (warnings []string, err error) }
ValidationInterface defines an admission handler that validates requests. It may not perform any kind of mutation.
Click to show internal directories.
Click to hide internal directories.