validation

package
v1.63.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// HandlerName is the name of this admission webhook handler.
	HandlerName = "validator"
	// WebhookPath is the HTTP handler path for this admission webhook handler.
	WebhookPath = "/webhooks/validate-operator-gardener-cloud-v1alpha1-garden"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Logger        logr.Logger
	RuntimeClient client.Client
}

Handler checks, if the secrets contains a kubeconfig and denies kubeconfigs with invalid fields (e.g. tokenFile or exec).

func (*Handler) AddToManager

func (h *Handler) AddToManager(mgr manager.Manager) error

AddToManager adds Handler to the given manager.

func (*Handler) ValidateCreate

func (h *Handler) ValidateCreate(ctx context.Context, obj runtime.Object) error

ValidateCreate performs the validation.

func (*Handler) ValidateDelete

func (h *Handler) ValidateDelete(_ context.Context, obj runtime.Object) error

ValidateDelete performs the validation.

func (*Handler) ValidateUpdate

func (h *Handler) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) error

ValidateUpdate performs the validation.

Jump to

Keyboard shortcuts

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