Benefits#
✅ Benefits of ClusterResourceSupervisor (Cluster-Scoped)#
- Centralized Control
- Enables cluster administrators to define global hibernation policies that apply across many namespaces or ArgoCD AppProjects.
-
Ideal for cost optimization in large environments (e.g., dev/test clusters that sleep nights and weekends).
-
Flexible Namespace Targeting
- Supports explicit namespace lists (
names) and dynamic selection via label selectors (matchLabels,matchExpressions). -
Allows automatic inclusion of new namespaces that match certain labels (e.g.,
env: dev). -
ArgoCD Integration
- Can target ArgoCD AppProjects, enabling hibernation based on GitOps application boundaries.
-
Useful in GitOps workflows where applications are grouped into projects—no need to track individual namespaces.
-
Rich Observability & auditability
- Detailed
statusincludes:watchedNamespaces/ignoreNamespacessleepingNamespaceswith per-application replica counts and kinds (Deployment/StatefulSet)
-
Helps operators debug, verify, and report on hibernation impact.
-
Cluster-Wide Efficiency
- One CR can manage dozens or hundreds of namespaces—reducing configuration sprawl.
✅ Benefits of ResourceSupervisor (Namespace-Scoped)#
- Self-Service for Teams
- Application owners or namespace tenants can define their own hibernation schedule without cluster-level permissions.
-
Empowers autonomy while still enabling cost savings.
-
Simplicity & Low Overhead
- Minimal spec: only requires a
schedule(sleep/wake cron expressions). -
No need to understand label selectors, ArgoCD, or cross-namespace concerns.
-
Namespace Isolation
- Each namespace can have independent schedules—e.g., staging sleeps weekends, QA sleeps every night.
-
Avoids "one-size-fits-all" policies that may not suit all workloads.
-
Lightweight Status
- Status tracks only
currentStatusandnextReconcileTime—sufficient for local use cases. -
Reduces cognitive load and storage overhead.
-
RBAC-Friendly
- Can be managed by users with only namespace-level roles (e.g.,
editor custom roles), improving security posture.
🎯 When to Use Which?#
| Need | Solved By |
|---|---|
| Platform team managing 100 dev namespaces | ClusterResourceSupervisor |
| Developer team wanting to hibernate their own namespace | ResourceSupervisor |
| GitOps-driven environment using ArgoCD AppProjects | ClusterResourceSupervisor |
| Avoiding privilege escalation for namespace owners | ResourceSupervisor |