Skip to content

Commit f03577b

Browse files
design-proposal(quota): accept, and land the VM grant narrowing on main on its own
Status moves to Accepted. The '*' on kubevirt.io/virtualmachines in cozy:tenant:super-admin:base is a bug from cozystack/cozystack#516, whose sibling '*' on helmreleases was already removed, so §7 now says the narrowing and its write-verb allowlist e2e land on main independently; phase 4 only depends on that change having landed. Signed-off-by: Mattia Eleuteri <[email protected]> Assisted-by: LLM
1 parent dd0efc7 commit f03577b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • design-proposals/tenant-quota-reservation

‎design-proposals/tenant-quota-reservation/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- **Title:** `Tenant quotas as reservation limits`
44
- **Author(s):** `@mattia-eleuteri`
55
- **Date:** `2026-08-03`
6-
- **Status:** Review
6+
- **Status:** Accepted
77

88
## Overview
99

@@ -356,7 +356,7 @@ Phase 5 deletes the only bound on the three paths in [Context](#context), so eac
356356
- sizing, disks and networking: `vm-instance` values, through the gate;
357357
- deletion: deleting the `VMInstance`.
358358

359-
The grant has carried `'*'` since the super-admin role was introduced, and nothing in tree depends on a tenant writing a raw `VirtualMachine`. The other option is keeping a namespace quota for workloads that are not applications. It cannot be expressed. `ResourceQuota` scopes select pods by priority class, QoS class or termination, never by owner. A quota that bounds a raw launcher therefore also counts every chart-rendered launcher, with its overhead and its `status.used`, and that is `tenant-quota` again. Scoping by priority class does not help either, because a raw VM can name the class a chart uses.
359+
The `'*'` is a bug rather than a design choice. It arrived in cozystack/cozystack#516 in December 2024, together with a `'*'` on `helmreleases` that has since been removed, and nothing in tree depends on a tenant writing a raw `VirtualMachine`. The narrowing therefore lands on `main` as its own change, with the write-verb allowlist e2e below beside it, without waiting for this design. This subsection only states the dependency: phase 4 requires that change to have landed. The other option is keeping a namespace quota for workloads that are not applications. It cannot be expressed. `ResourceQuota` scopes select pods by priority class, QoS class or termination, never by owner. A quota that bounds a raw launcher therefore also counts every chart-rendered launcher, with its overhead and its `status.used`, and that is `tenant-quota` again. Scoping by priority class does not help either, because a raw VM can name the class a chart uses.
360360

361361
Narrowing the grant stops new writes. It does not touch a raw VM that already exists. So the phase-5 upgrade lists the `kubevirt.io` `VirtualMachines` in tenant namespaces that no labelled HelmRelease owns, and reports them before `tenant-quota` is deleted, the same way the re-evaluation migration reports pools ([Security](#security)). The operator then decides, per VM, whether to adopt it into a `VMInstance` or delete it. Once the quota is gone, such a VM is unreserved and unbounded.
362362

@@ -451,7 +451,7 @@ Rollback is turning the flag off, for every step except the last. Phase 5 is irr
451451
| 1 | `pkg/reservation` as a standalone importable package — the evaluator, environment resolution with class keys, the aggregator — plus schema defaulting of its inputs. No consumer | n/a |
452452
| 2 | Consumption declared on `ApplicationDefinition`, for the IaaS kinds first (`vm-instance`, `vm-disk`, `kubernetes`, `kubernetes-nodes`), which carry the whole overhead problem. ComputePlane's `md0` default materialized into its values | n/a |
453453
| 3 | Usage oracle and budget source switchable; gate generalized to kinds that declare their consumption, with per-pool-root serialization and post-write re-read; `reserved`/`budget` persisted on the `Tenant`'s HelmRelease and projected into its status | off by default |
454-
| 4 | Remaining kinds, package by package, until every kind declares its consumption or an explicit exemption; redis, valkey and Harbor's redis sentinels moved to a small fixed preset; exemptions on the tenant module kinds except `Monitoring`, which reserves its storage, and its gate (via #39 or the fallback in [§5](#5-generalizing-the-gate-to-every-kind)); the rendered-requests overhead figures checked in per kind; the [§7 prerequisites](#prerequisite-no-sized-workload-around-the-gate): super-admin write verbs on `kubevirt.io/virtualmachines` removed, restore and import checked against the pool, tenant write-verb allowlist in e2e | on by default |
454+
| 4 | Remaining kinds, package by package, until every kind declares its consumption or an explicit exemption; redis, valkey and Harbor's redis sentinels moved to a small fixed preset; exemptions on the tenant module kinds except `Monitoring`, which reserves its storage, and its gate (via #39 or the fallback in [§5](#5-generalizing-the-gate-to-every-kind)); the rendered-requests overhead figures checked in per kind; the [§7 prerequisites](#prerequisite-no-sized-workload-around-the-gate): super-admin write verbs on `kubevirt.io/virtualmachines` removed (landed on `main` independently, with the tenant write-verb allowlist in e2e), restore and import checked against the pool | on by default |
455455
| 5 | Unowned raw `VirtualMachines` in tenant namespaces reported; then `tenant-quota` deleted and the `LimitRange` re-homed unconditionally; `EnforcedHard` / `tenant-quota-allocated` removed; `--tenant-quota-buffer-percent` deleted; flag removed | removed |
456456

457457
Phases 1 to 3 form a self-contained, testable increment and are what implementation would start with — and they are already the bulk of the user-visible win, since they are what puts a gate in front of an ordinary application order for the first time. Phase 5 is only defensible once phase 4 is complete. Removing the runtime net presupposes two things: every kind reserves, and no sized workload reaches a tenant namespace around the gate. Phase 4 delivers both. Phase 5 additionally depends on resolving the `LimitRange`/launcher-limit interaction in [§7](#7-retiring-the-namespace-resourcequota) on a dev cluster.

0 commit comments

Comments
 (0)