Help us shape the future of Go! Take the 2026 Go Developer Survey

events

package
v0.13.7 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionCordoned       string = "Cordoned"
	ActionUncordoned     string = "UnCordoned"
	ActionReconciled     string = "Reconciled"
	ActionDisassociating string = "Disassociating"

	ActionMutated          string = "Mutated"
	ActionValidationDenied string = "ValidationDenied"
	ActionRuleAudit        string = "RuleAudit"
)
View Source
const (
	// Generic.
	ReasonTenantResourceWriteOp string = "TenantResourceWriteOp"
	ReasonOverprovision         string = "Overprovisioned"
	ReasonCordoning             string = "Cordoned"
	// ForbiddenLabelReason used as reason string to deny forbidden labels.
	ReasonForbiddenLabel string = "ForbiddenLabel"
	// ForbiddenAnnotationReason used as reason string to deny forbidden annotations.
	ReasonForbiddenAnnotation string = "ForbiddenAnnotation"
	ReasonAdmissionFailure    string = "AdmissionFailed"

	// RuleStatus.
	ReasonNamespaceRuleAudit string = "NamespaceRuleAudit"
	// Namespace.
	ReasonNamespaceHijack string = "ReasonNamespacePatch"

	// Tenant.
	ReasonTenantDefaulted     string = "TenantDefaulted"
	ReasonTenantAssigned      string = "TenantAssigned"
	ReasonInvalidTenantPrefix string = "InvalidTenantPrefix"
	ReasonPromotionDenied     string = "ReasonPromotionDenied"

	// Classes.
	ReasonMissingStorageClass    string = "MissingStorageClass"
	ReasonForbiddenStorageClass  string = "ForbiddenStorageClass"
	ReasonForbiddenPriorityClass string = "ForbiddenPriorityClass"
	ReasonForbiddenRuntimeClass  string = "ForbiddenRuntimeClass"
	ReasonForbiddenIngressClass  string = "ForbiddenIngressClass"
	ReasonMissingIngressClass    string = "MissingIngressClass"
	ReasonForbiddenGatewayClass  string = "ForbiddenGatewayClass"
	ReasonMissingGatewayClass    string = "MissingGatewayClass"
	ReasonMissingDeviceClass     string = "MissingDeviceClass"
	ReasonForbiddenDeviceClass   string = "ForbiddenDeviceClass"

	// Nodes.
	ReasonForbiddenNodeSelectorUpdate string = "ForbiddenNodeSelectorUpdate"

	// Pods.
	ReasonMissingFQCI                string = "MissingFQCI"
	ReasonForbiddenContainerRegistry string = "ForbiddenContainerRegistry"
	ReasonForbiddenPullPolicy        string = "ForbiddenPullPolicy"
	ReasonForbiddenPodQoSClass       string = "ForbiddenQoSClass"
	ReasonForbiddenPodScheduler      string = "ForbiddenScheduler"

	// Ingress.
	ReasonWildcardDenied           string = "WildcardDenied"
	ReasonIngressHostnameNotValid  string = "IngressHostnameNotValid"
	ReasonIngressHostnameEmpty     string = "IngressHostnameEmpty"
	ReasonIngressHostnameCollision string = "IngressHostnameCollision"

	// Services.
	ReasonForbiddenExternalServiceIP string = "ForbiddenExternalServiceIP"
	ReasonForbiddenLoadBalancer      string = "ForbiddenLoadBalancer"
	ReasonForbiddenExternalName      string = "ForbiddenExternalName"
	ReasonForbiddenNodePort          string = "ForbiddenNodePort"
	ReasonForbiddenServiceType       string = "ForbiddenServiceType"
	ReasonForbiddenLoadBalancerCIDR  string = "ForbiddenLoadBalancerCIDR"

	// Storage.
	ReasonCrossTenantReference string = "CrossTenantReference"

	// ResourcePools.
	ReasonDisassociated string = "Disassociated"

	// CustomQuotas.
	ReasonUsageCalculationFailed = "UsageCalculationFailed"
	ReasonQuotaExceeded          = "QuotaExceeded"
)
View Source
const (
	ReportingController = "controller.projectcapsule.dev"
	ReportingInstance   = "capsule-admission"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventRecorder added in v0.13.7

type EventRecorder struct {
	k8sevents.EventRecorder
	// contains filtered or unexported fields
}

func NewEventRecorder added in v0.13.7

func NewEventRecorder(
	c client.Client,
	log logr.Logger,
	recorder k8sevents.EventRecorder,
	configuration configuration.Configuration,
) *EventRecorder

func (*EventRecorder) LabeledEvent added in v0.13.7

func (r *EventRecorder) LabeledEvent(
	regarding runtime.Object,
	eventType string,
	reason string,
	action string,
	note string,
) *LabeledEvent

type LabeledEvent added in v0.13.7

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

func (*LabeledEvent) Emit added in v0.13.7

func (e *LabeledEvent) Emit(ctx context.Context)

func (*LabeledEvent) WithAnnotations added in v0.13.7

func (e *LabeledEvent) WithAnnotations(annotations map[string]string) *LabeledEvent

func (*LabeledEvent) WithLabels added in v0.13.7

func (e *LabeledEvent) WithLabels(labels map[string]string) *LabeledEvent

func (*LabeledEvent) WithRelated added in v0.13.7

func (e *LabeledEvent) WithRelated(obj runtime.Object) *LabeledEvent

func (*LabeledEvent) WithRequestAnnotations added in v0.13.7

func (e *LabeledEvent) WithRequestAnnotations(req admission.Request) *LabeledEvent

func (*LabeledEvent) WithTenantLabel added in v0.13.7

func (e *LabeledEvent) WithTenantLabel(tnt *capsulev1beta2.Tenant) *LabeledEvent

Jump to

Keyboard shortcuts

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