k8scel

package
v0.0.0-...-c2efb00 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Index

Constants

View Source
const (
	VAPGenerationLabel = "gatekeeper.sh/use-vap"
	VAPDefaultYes      = vapDefault("yes")
	VAPDefaultNo       = vapDefault("no")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ARGetter

type ARGetter interface {
	GetAdmissionRequest() *admissionv1.AdmissionRequest
}

type Arg

type Arg func(*Driver) error

func GatherStats

func GatherStats() Arg

GatherStats starts collecting various stats around the underlying engine's calls.

func VAPGenerationDefault

func VAPGenerationDefault(d vapDefault) Arg

VAPGenerationDefault sets the expected default value of the `gatekeeper.sh/use-vap` label. If no value is provided, VAP generation is presumed to be disabled and the engine will validate ALL policies. Otherwise, the engine will only validate policies not expected to be enforced via VAP.

type Driver

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

func New

func New(args ...Arg) (*Driver, error)

func (*Driver) AddConstraint

func (d *Driver) AddConstraint(_ context.Context, _ *unstructured.Unstructured) error

func (*Driver) AddData

func (d *Driver) AddData(_ context.Context, _ string, _ storage.Path, _ interface{}) error

func (*Driver) AddTemplate

func (d *Driver) AddTemplate(_ context.Context, ct *templates.ConstraintTemplate) error

func (*Driver) Dump

func (d *Driver) Dump(_ context.Context) (string, error)

func (*Driver) GetDescriptionForStat

func (d *Driver) GetDescriptionForStat(statName string) (string, error)

func (*Driver) Name

func (d *Driver) Name() string

func (*Driver) Query

func (d *Driver) Query(ctx context.Context, target string, constraints []*unstructured.Unstructured, review interface{}, opts ...drivers.QueryOpt) (*drivers.QueryResponse, error)

func (*Driver) RemoveConstraint

func (d *Driver) RemoveConstraint(_ context.Context, _ *unstructured.Unstructured) error

func (*Driver) RemoveData

func (d *Driver) RemoveData(_ context.Context, _ string, _ storage.Path) error

func (*Driver) RemoveTemplate

func (d *Driver) RemoveTemplate(_ context.Context, ct *templates.ConstraintTemplate) error

type IsAdmissionGetter

type IsAdmissionGetter interface {
	IsAdmissionRequest() bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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