Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAttributeFromRequest

func NewAttributeFromRequest(req admission.Request, d *admission.Decoder, scheme *runtime.Scheme) (apiadmission.Attributes, error)

NewAttributeFromRequest converts the given request into api attributes

func Register

func Register(ctrlCtx *controllers.Context) error

Register registers the webhooks to the manager

Types

type QuotaValidator

type QuotaValidator struct {
	Log    logr.Logger
	Scheme *runtime.Scheme

	AdmissionController apiadmission.ValidationInterface // contains filtered or unexported fields

}

QuotaValidator validates pods

func (*QuotaValidator) Handle

Handle handles the admission request

func (*QuotaValidator) InjectDecoder

func (v *QuotaValidator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type Validator

type Validator struct {
	Log           logr.Logger
	StrictDecoder encoding.Decoder
	NormalDecoder encoding.Decoder
}

func (*Validator) Handle