constrainttemplate

package
v3.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrCreateCode indicates a problem creating a ConstraintTemplate CRD.
	ErrCreateCode = "create_error"
	// ErrUpdateCode indicates a problem updating a ConstraintTemplate CRD.
	ErrUpdateCode = "update_error"
	// ErrConversionCode indicates a problem converting a ConstraintTemplate CRD.
	ErrConversionCode = "conversion_error"
	// ErrIngestCode indicates a problem ingesting a ConstraintTemplate Rego code.
	ErrIngestCode = "ingest_error"
	// ErrParseCode indicates a problem parsing a ConstraintTemplate.
	ErrParseCode = "parse_error"
)
View Source
const (
	// ErrGenerateVAPState indicates a problem generating a VAP.
	ErrGenerateVAPState = "error"
	// GeneratedVAPState indicates a VAP was generated.
	GeneratedVAPState = "generated"
	// ErrOperationMismatchCode indicates operations mismatch between webhook and constraint template.
	ErrOperationMismatchCode = "operation_mismatch_warning"
)

Variables

This section is empty.

Functions

func ShouldGenerateVAPForVersionedCT added in v3.21.0

func ShouldGenerateVAPForVersionedCT(ct *v1beta1.ConstraintTemplate, scheme *runtime.Scheme) (bool, error)

Types

type Adder

type Adder struct {
	CFClient           *constraintclient.Client
	WatchManager       *watch.Manager
	Tracker            *readiness.Tracker
	ProcessExcluder    *process.Excluder
	GetPod             func(context.Context) (*corev1.Pod, error)
	WebhookConfigCache *webhookconfigcache.WebhookConfigCache
	CtEvents           <-chan event.GenericEvent
}

func (*Adder) Add

func (a *Adder) Add(mgr manager.Manager) error

Add creates a new ConstraintTemplate Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

func (*Adder) InjectCFClient added in v3.14.0

func (a *Adder) InjectCFClient(c *constraintclient.Client)

func (*Adder) InjectConstraintTemplateEvent added in v3.21.0

func (a *Adder) InjectConstraintTemplateEvent(ctEvents chan event.GenericEvent)

func (*Adder) InjectGetPod

func (a *Adder) InjectGetPod(getPod func(context.Context) (*corev1.Pod, error))

func (*Adder) InjectProcessExcluder added in v3.21.0

func (a *Adder) InjectProcessExcluder(m *process.Excluder)

func (*Adder) InjectTracker

func (a *Adder) InjectTracker(t *readiness.Tracker)

func (*Adder) InjectWatchManager

func (a *Adder) InjectWatchManager(wm *watch.Manager)

func (*Adder) InjectWebhookConfigCache added in v3.21.0

func (a *Adder) InjectWebhookConfigCache(wcc *webhookconfigcache.WebhookConfigCache)

type ReconcileConstraintTemplate

type ReconcileConstraintTemplate struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileConstraintTemplate reconciles a ConstraintTemplate object.

func (*ReconcileConstraintTemplate) Reconcile

Reconcile reads that state of the cluster for a ConstraintTemplate object and makes changes based on the state read and what is in the ConstraintTemplate.Spec.

Jump to

Keyboard shortcuts

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