webhooks

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespaceQuotaValidator added in v0.10.0

type NamespaceQuotaValidator struct {
	Decoder *admission.Decoder

	// Client is used to fetch namespace counts
	Client client.Reader

	Skipper skipper.Skipper

	OrganizationLabel                 string
	UserDefaultOrganizationAnnotation string

	// SelectedProfile is the name of the ZoneUsageProfile to use for the quota
	SelectedProfile string

	// QuotaOverrideNamespace is the namespace in which the quota overrides are stored
	QuotaOverrideNamespace string
}

NamespaceQuotaValidator checks namespaces for allowed node selectors.

func (*NamespaceQuotaValidator) Handle added in v0.10.0

Handle handles the admission requests

type PodNodeSelectorMutator added in v0.6.0

type PodNodeSelectorMutator struct {
	Decoder *admission.Decoder

	// Client is used to fetch namespace metadata
	Client client.Reader

	// DefaultNodeSelector is the default node selector to apply to pods
	DefaultNodeSelector map[string]string
	// DefaultNamespaceNodeSelectorAnnotation is the annotation to use for the default node selector
	DefaultNamespaceNodeSelectorAnnotation string

	Skipper skipper.Skipper
}

PodNodeSelectorMutator checks namespaces for allowed node selectors.

func (*PodNodeSelectorMutator) Handle added in v0.6.0

Handle handles the admission requests

type RatioValidator

type RatioValidator struct {
	Decoder *admission.Decoder
	Client  client.Client

	Ratio       ratioFetcher
	RatioLimits limits.Limits

	// DefaultNodeSelector is the default node selector to apply to pods
	DefaultNodeSelector map[string]string
	// DefaultNamespaceNodeSelectorAnnotation is the annotation to use for the default node selector
	DefaultNamespaceNodeSelectorAnnotation string
}

RatioValidator checks for every action in a namespace whether the Memory to CPU ratio limit is exceeded and will return a warning if it is.

func (*RatioValidator) Handle

Handle handles the admission requests

Jump to

Keyboard shortcuts

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