webhooks

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

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

	Decoder   *admission.Decoder
	Validator apiadmission.ValidationInterface
}

QuotaValidator validates pods

func (*QuotaValidator) Handle

Handle handles the admission request

type Validator

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

func (*Validator) Handle

Jump to

Keyboard shortcuts

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