Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManagedVPALifecycle ¶ added in v0.0.12
ManagedVPALifecycle returns a predicate that requeues the owning workload when a managed VPA diverges from the operator’s desired state.
This predicate is intended for workload reconcilers (e.g. DeploymentReconciler) to provide “snap-back” behavior when users manually tamper with managed VPAs.
It reacts to *operator-owned drift*, not arbitrary churn.
Semantics:
- Create: enqueue only if the VPA is managed.
- Update: enqueue if:
- managed label toggled,
- deletion started,
- controller ownerRef changed,
- operator-owned labels changed (managed/profile), or
- spec changed.
- Delete: enqueue only if the deleted VPA was managed.
- Generic: disabled to avoid noisy resyncs.
func ManagedVPAStructuralLifecycle ¶ added in v0.0.17
ManagedVPAStructuralLifecycle returns a predicate that reacts only to *structural lifecycle events* of managed VPAs.
This predicate is intended for the VPAReconciler, which acts as a safety net and enforces ownership correctness.
It deliberately ignores spec, label drift, and status churn.
Semantics:
- Create: enqueue only if the VPA is managed (label == "true").
- Update: enqueue if:
- managed label toggled,
- deletion started, or
- controller ownerRef changed.
- Delete: enqueue only if the deleted VPA was managed.
- Generic: disabled to avoid noisy resyncs.
func ProfileAnnotationLifecycle ¶ added in v0.0.12
ProfileAnnotationLifecycle returns a predicate that reacts to lifecycle events relevant to the operator’s profile annotation on workload resources (Deployments, StatefulSets, DaemonSets).
This predicate determines *when a workload should be reconciled* based on opt-in semantics controlled via an annotation.
Semantics:
- Create: enqueue only if the workload is opted-in (annotation present and non-empty).
- Update: enqueue if:
- opt-in was added or removed,
- the profile value changed, or
- deletion has just started (for cleanup).
- Delete: enqueue only if the workload was opted-in, so managed VPAs can be cleaned up.
- Generic: disabled to avoid noisy resyncs.
Types ¶
This section is empty.