admissioncheck

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilParametersRef = errors.New("missing parameters reference")
	ErrBadParametersRef = errors.New("bad parameters reference")
)

Functions

func FilterForController

func FilterForController(ctx context.Context, c client.Client, states []kueue.AdmissionCheckState, controllerName string) ([]string, error)

FilterForController - returns a list of check names controlled by ControllerName.

func FilterProvReqAnnotations added in v0.7.0

func FilterProvReqAnnotations(annotations map[string]string) map[string]string

FilterProvReqAnnotations returns annotations containing the Provisioning Request annotation prefix.

func IndexerByConfigFunction

func IndexerByConfigFunction(controllerName string, gvk schema.GroupVersionKind) client.IndexerFunc

func NewAdmissionChecks added in v0.7.0

func NewAdmissionChecks(cq *kueue.ClusterQueue) map[string]sets.Set[kueue.ResourceFlavorReference]

NewAdmissionChecks aggregates AdmissionChecks from .spec.AdmissionChecks and .spec.AdmissionChecksStrategy

Types

type ConfigHelper

type ConfigHelper[PtrT objAsPtr[T], T any] struct {
	// contains filtered or unexported fields
}

func NewConfigHelper

func NewConfigHelper[PtrT objAsPtr[T], T any](c client.Client) (*ConfigHelper[PtrT, T], error)

func (*ConfigHelper[PtrT, T]) ConfigByName

func (ch *ConfigHelper[PtrT, T]) ConfigByName(ctx context.Context, name string) (PtrT, error)

ConfigByName - get the config identified by its name

func (*ConfigHelper[PtrT, T]) ConfigForAdmissionCheck

func (ch *ConfigHelper[PtrT, T]) ConfigForAdmissionCheck(ctx context.Context, checkName string) (PtrT, error)

ConfigForAdmissionCheck - get the configuration of the admission check identified by its name if it uses the helpers configuration type.

func (*ConfigHelper[PtrT, T]) ConfigFromRef

func (ch *ConfigHelper[PtrT, T]) ConfigFromRef(ctx context.Context, ref *kueue.AdmissionCheckParametersReference) (PtrT, error)

ConfigFromRef - get the config identified by ref if valid.

Jump to

Keyboard shortcuts

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