webhooks

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewValidateNamespaceDeletionHandler

func NewValidateNamespaceDeletionHandler(ctx context.Context, cache cache.Cache) (admission.Handler, error)

NewValidateNamespaceDeletionHandler creates a new handler for validating namespace deletions.

Types

type KubeconfigSecretValidator

type KubeconfigSecretValidator struct {
	// contains filtered or unexported fields
}

KubeconfigSecretValidator is a webhook handler validating CREATE and UPDATE requests on secrets. It checks, if the secrets contains a kubeconfig and denies kubeconfigs with invalid fields (e.g. tokenFile or exec).

func (*KubeconfigSecretValidator) Handle

Handle implements the webhook handler for kubeconfig secret validation.

func (*KubeconfigSecretValidator) InjectDecoder

func (h *KubeconfigSecretValidator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects a decoder capable of decoding objects included in admission requests.

func (*KubeconfigSecretValidator) InjectLogger

func (h *KubeconfigSecretValidator) InjectLogger(l logr.Logger) error

InjectLogger injects a logger into the handler.

type ObjectSizeHandler

type ObjectSizeHandler struct {
	// Config is the configuration for this webhook handler.
	Config *apisconfig.ResourceAdmissionConfiguration
	// contains filtered or unexported fields
}

ObjectSizeHandler is a webhook handler for validating that the resource size of a request doesn't exceed the configured limits.

func (*ObjectSizeHandler) Handle

Handle implements the webhook handler for resource size validation.

func (*ObjectSizeHandler) InjectDecoder

func (h *ObjectSizeHandler) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects a decoder capable of decoding objects included in admission requests.

func (*ObjectSizeHandler) InjectLogger

func (h *ObjectSizeHandler) InjectLogger(l logr.Logger) error

InjectLogger injects a logger into the handler.

Directories

Path Synopsis
admission
auth

Jump to

Keyboard shortcuts

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