admissioncheck

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 8 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 IndexerByConfigFunction

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

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