admission

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler is an HTTP handler that can be used as a Kubernetes Mutating Admission Controller.

func NewHandler

func NewHandler(rev []Reviewer) *Handler

NewHandler returns a new Handler that reviews incoming requests using the given reviewers.

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP implements http.Handler.

type Reviewer

type Reviewer interface {
	CanReview(req *admv1.AdmissionRequest) bool
	Review(ctx context.Context, req *admv1.AdmissionRequest) ([]byte, error)
}

Reviewer allows to review an admission review request.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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