target

package
v3.9.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "admission.k8s.gatekeeper.sh"

Name is the name of Gatekeeper's Kubernetes validation target.

Variables

View Source
var (
	ErrCreatingMatcher = errors.New("unable to create matcher")
	ErrReviewFormat    = errors.New("unsupported request review")
	ErrRequestObject   = errors.New("invalid request object")
	ErrMatching        = errors.New("error matching the requested object")
	ErrCachingType     = errors.New("cannot cache non-namespace type")
)

Functions

func IsWipeData

func IsWipeData(o interface{}) bool

func WipeData

func WipeData() interface{}

WipeData returns a value which, when passed to client.RemoveData(), wipes all cached data.

Types

type AugmentedReview

type AugmentedReview struct {
	AdmissionRequest *admissionv1.AdmissionRequest
	Namespace        *corev1.Namespace
}

type AugmentedUnstructured

type AugmentedUnstructured struct {
	Object    unstructured.Unstructured
	Namespace *corev1.Namespace
}

AugmentedUnstructured is an Object to review, and its Namespace (if known).

type K8sValidationTarget

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

func (*K8sValidationTarget) GetCache

func (h *K8sValidationTarget) GetCache() handler.Cache

func (*K8sValidationTarget) GetName

func (h *K8sValidationTarget) GetName() string

func (*K8sValidationTarget) HandleReview

func (h *K8sValidationTarget) HandleReview(obj interface{}) (bool, interface{}, error)

func (*K8sValidationTarget) MatchSchema

func (*K8sValidationTarget) ProcessData

func (h *K8sValidationTarget) ProcessData(obj interface{}) (bool, []string, interface{}, error)

func (*K8sValidationTarget) ToMatcher

ToMatcher converts .spec.match in mutators to Matcher.

func (*K8sValidationTarget) ValidateConstraint

func (h *K8sValidationTarget) ValidateConstraint(u *unstructured.Unstructured) error

type Matcher

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

Matcher implements constraint.Matcher.

func (*Matcher) Match

func (m *Matcher) Match(review interface{}) (bool, error)

Jump to

Keyboard shortcuts

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