admissionctrl

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmissionController

type AdmissionController interface {
	Name() string
}

type JobHandler

type JobHandler struct {
	// contains filtered or unexported fields
}

func NewJobHandler

func NewJobHandler(mutators []JobMutator, validators []JobValidator, logger *slog.Logger, resolverToken bool) *JobHandler

func (*JobHandler) AdmissionMutators

func (j *JobHandler) AdmissionMutators(ctx context.Context, payload *types.Payload) (job *api.Job, warnings []error, err error)

AdmissionMutators returns an updated job as well as warnings or an error.

func (*JobHandler) AdmissionValidators

func (j *JobHandler) AdmissionValidators(ctx context.Context, payload *types.Payload) ([]error, error)

AdmissionValidators returns a slice of validation warnings and a multierror of validation failures.

func (*JobHandler) ApplyAdmissionControllers

func (j *JobHandler) ApplyAdmissionControllers(ctx context.Context, payload *types.Payload) (out *api.Job, warnings []error, err error)

func (*JobHandler) ResolveToken

func (j *JobHandler) ResolveToken() bool

type JobMutator

type JobMutator interface {
	AdmissionController
	Mutate(context.Context, *types.Payload) (*api.Job, bool, []error, error)
}

type JobValidator

type JobValidator interface {
	AdmissionController
	Validate(context.Context, *types.Payload) (warnings []error, err error)
}

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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