feat(dashboard): show tenant quota remaining in burstable and dedicated CPU views #2440
Description
Context
Tenant resourceQuotas are rendered into Kubernetes ResourceQuota with limits.cpu = input and requests.cpu = input / cpuAllocationRatio (default ratio: 10). This correctly reflects the platform's overcommit policy for regular (burstable) VMs and containers.
KubeVirt instance types with dedicatedCPUPlacement: true (the cx* series and other Guaranteed-QoS workloads) pin physical cores and have pod requests == limits, bypassing the ratio. A single dedicated-CPU VM therefore consumes requests.cpu quota ~N× faster than limits.cpu. This is mathematically correct — a pinned core is ~N× more expensive to the platform — but it confuses tenants, who see "limits still has headroom" while VM creation is already blocked by requests.
Context: #2435 tried to fix this on the quota side (new dedicatedCPU key) and was closed. Agreement: the quota math is correct; the problem is presentation.
Proposal
Surface remaining CPU quota in the tenant dashboard (and any tenant-info API) as two complementary views derived from the same live ResourceQuota:
Remaining: ≈10 vCPU of burstable workload OR ≈1 physical core of dedicated-CPU workload
Both numbers compute from the same limits.cpu/requests.cpu and the current cpuAllocationRatio; they just frame the remainder from each side.
Acceptance criteria
- Tenant dashboard shows remaining CPU in both burstable and dedicated views
- Values derive from live
ResourceQuotastatus and the activecpuAllocationRatio - Existing users with only burstable workloads see no regression
Related
- feat(tenants): add dedicatedCPU quota sugar for pinned-CPU workloads #2435 — closed PR exploring a quota-side fix; see comment thread for the decision to solve this at the presentation layer instead
Activity
SerjioTT commentedon May 5, 2026
This issue covers just a part of the broader problem I would like to show.
Hidden consumption of quotas by components of other managed app
Most managed apps deploy auxiliary processes that consume quota but are invisible to the tenant. There are couple examples here that I found in the charts:
Redis (
packages/apps/redis/templates/redisfailover.yaml) — the worst case. Sentinel pods (rfs-*) receive the same resource profile as data pods (rfr-*), because the template passes the same(resourcesPreset, resources)tuple to both:A tenant ordering 3 Redis replicas × 2 CPU / 2Gi expects 6 CPU / 6Gi in limits. Actual consumption: 12 CPU / 12Gi (3 data + 3 sentinel, each 2 CPU / 2Gi). Sentinel is a lightweight monitoring process — I suppose
nanopreset (250m / 128Mi) would be sufficient.The values schema (
packages/apps/redis/values.schema.json) has a singleresources/resourcesPreset— no separate sentinel configuration is exposed to the user.Kafka (
packages/apps/kafka/templates/kafka.yaml) — a Kafka deployment has three components that consume quota:kafka.resourcesPreset/kafka.resources✅zookeeper.resourcesPreset/zookeeper.resources✅ (defined inpackages/apps/kafka/values.yaml, default presetsmall, 3 replicas)Entity Operator pods get resources only via LimitRange defaults. This is the least severe of the issues (just 1 extra pod), but still invisible to quota planning. The bigger tenant-facing problem with Kafka is that even though ZooKeeper is configurable, a tenant ordering "3 Kafka replicas" may not realize they also need to budget for 3 ZooKeeper replicas at
smallpreset (1 CPU / 512Mi each) — the total quota impact is ~2× what a naive "3 brokers × 1 CPU" calculation suggests.What the tenant actually sees
Today the dashboard shows per-application WorkloadMonitors (which track replica health per component — e.g., separate monitors for
redisandsentinelinredisfailover.yamlBut there is no tenant-level view of aggregate ResourceQuota consumption. A tenant has no way to answer "how much of my quota is used and by what?" without runningkubectl describe resourcequota— which they may not have access (or knowledge) to.The Kubernetes
ResourceQuotaobject already has.status.usedvs.status.hard— the data exists, it's just not surfaced.Proposal: show ResourceQuota usage in the tenant dashboard
Rather than (or in addition to) the burstable-vs-dedicated CPU view from the original proposal, I'd suggest a more general solution:
Show the live
ResourceQuotastatus (used / hard) for the tenant namespace directly in the dashboard. This would cover:requests.cpu: 5/10andlimits.cpu: 5/100and understands that requests are the bottleneckConcretely, the dashboard could show something like:
Relation to existing infrastructure
The
WorkloadMonitorCRD already tracks per-component replica counts and resource presets (labelworkloads.cozystack.io/resource-preset). The quota view is complementary: WorkloadMonitor answers "is my Redis healthy?", while ResourceQuota status answers "how much capacity do I have left?"Summary: The core user problem is "I don't understand my resource consumption." Showing live ResourceQuota status (used/hard) in the tenant dashboard solves both the dedicated-CPU confusion from this issue and the hidden-auxiliary-component problem across all managed apps, without adding new quota keys or chart-level sugar.
dosubot commentedon Aug 4, 2026
Hi, Andrei Kvapil (@kvaps). I'm Dosu, and I'm helping the cozystack team manage their backlog and am marking this issue as stale.
Issue Summary
ResourceQuotaused/hard status directly in the tenant dashboard so all quota dimensions are visible.Next Steps
Thanks for your understanding and contribution.