admission

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const NamespaceEventType = "dev.chainguard.admission.namespace.v1"

NamespaceEventType is the cloudevents event type when a namespace's scope changes to include or exclude a particular admission controller.

View Source
const ReviewEventType = "dev.chainguard.admission.v1"

ReviewEventType is the cloudevents event type when an admission controller is invoked.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change string

Change is an enumeration of the types of changes we will emit events for.

const (
	// CreatedChange is emitted the first time we see a resource
	CreatedChange Change = "created"

	// UpdatedChange is emitted when we see a resource change.
	UpdatedChange Change = "updated"
)

type EnforcerState

type EnforcerState string

EnforcerState is an enumeration of the possible states that the enforcer may be in.

const (
	// EnabledEnforcerState is emitted when enforcement is enabled.
	EnabledEnforcerState EnforcerState = "enabled"

	// DisabledEnforcerState is emitted when enforcement is disabled.
	DisabledEnforcerState EnforcerState = "disabled"
)

type NamespaceBody

type NamespaceBody struct {
	// Name is the name of the namespace as it appears within the user's cluster
	// e.g. kube-system
	Name string `json:"name"`

	// ID is the UIDP of the Namespace (whose parent is the Cluster UIDP)
	ID uidp.UIDP `json:"id"`

	// Change holds the type of change to the namespace we have observed.
	Change Change `json:"change"`

	// EnforcerState holds the state that policy enforcement is in for a
	// particular namespace.
	EnforcerState EnforcerState `json:"enforcer_state"`
}

NamespaceBody is the body of the Chainguard event Occurrence when the event type is NamespaceEventType.

type ReviewBody

type ReviewBody admissionv1.AdmissionReview

ReviewBody is the body of the Chainguard event Occurrence when the event type is ReviewEventType.

Jump to

Keyboard shortcuts

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