kubeconfigsecret

package
v1.91.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HandlerName is the name of this admission webhook handler.
	HandlerName = "kubeconfig_validator"
	// WebhookPath is the HTTP handler path for this admission webhook handler.
	WebhookPath = "/webhooks/validate-kubeconfig-secrets"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler added in v1.60.0

type Handler struct {
	Logger logr.Logger
}

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

func (*Handler) AddToManager added in v1.60.0

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

AddToManager adds Handler to the given manager.

func (*Handler) ValidateCreate added in v1.60.0

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

ValidateCreate performs the check.

func (*Handler) ValidateDelete added in v1.60.0

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

ValidateDelete returns nil (not implemented by this handler).

func (*Handler) ValidateUpdate added in v1.60.0

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

ValidateUpdate performs the check.

Jump to

Keyboard shortcuts

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