Repository navigation
Commit d78efc7
design-proposal(quota): address round-1 maintainer review
Reviewed by @kvaps and @lllamnyp. Verified every claim against
cozystack/cozystack main (301a7fed2) before changing the text.
Corrections where the proposal was wrong or stale:
- The DHA interaction was written against a superseded revision. The
accepted design renders a KEDA ScaledObject targeting the CNPG
Cluster's scale subresource and never writes the Application's
replicas, so no Update reaches the gate. Reserve
autoscaling.maxReplicas when autoscaling.enabled, same answer as the
cluster-autoscaler on worker pools. DHA needs a matching amendment
since its "quota is not re-implemented" claim rests on the namespace
ResourceQuota this proposal retires.
- "Exactly one values-invisible case exists in tree" was wrong by a
wide margin. Replaced with an explicit per-kind table of what is
deliberately platform overhead, and a test comparing the evaluator
against rendered pod requests rather than a completeness test that
proves nothing about adequacy.
- #3315 merged 2026-08-26: spec.nodeGroups and the implicit md0 are
gone from the kubernetes chart. Dropped forEach and the transitional
item. The hole moved to ComputePlane, which materialises md0 at
template time; named there instead.
- The concurrent-create overshoot is not bounded by one. A single
client's sequential burst can outrun its own informer cache. Stated
the real bound and added per-pool-root serialisation plus a
post-write re-read to phase 3.
- vm-instance already omits the instancetype when resources are
complete (virtual-machine.effectiveInstanceType); the edge case
saying otherwise was stale.
Substantive additions:
- The missing gate is now failure 0 in The problem: validateTenant-
ResourceQuotas returns early unless the kind is Tenant, so ordering
a VMInstance is checked against nothing until pod admission.
- snapshot also reads the budget from the rendered tenant-quota's
spec.hard, so both sides move to shorthand units or the report
compares two vocabularies. reconciler_test.go changes; pool_test.go
does not.
- --tenant-quota-buffer-percent never reached the reported case: the
reconciler skips pools with no carve-outs and one member. Deleted in
phase 5 rather than deprecated.
- Retire the namespace ResourceQuota rather than loosen it; render the
LimitRange unconditionally and give up shared-CPU launcher memory
limits. Flags the LimitRange default.memory vs launcher request
interaction as a blocking dev-cluster test.
- Instance types resolve to scalars keyed by class, derived from the
spec rather than the series name. Note this also corrects the
reviewer's enumeration: m1 is shared-CPU with hugepages, n1 is a
fourth dedicated series, o1 sets overcommitPercent.
- reserved/budget become a status on the Tenant application;
pkg/reservation becomes standalone and importable.
- Preset table is generated from _resourcepresets.tpl rather than
parity-tested. Legacy flat aliases are resolved, not rejected: the
shipped values.schema.json enums still accept them.
- Refuse, never admit for later retry.
New findings not raised in review:
- Schema defaults are applied on the read path only; REST.Create
stores the spec verbatim. An evaluator reading raw HelmRelease
values undercharges every application created with defaults. The
evaluator must default its inputs.
- vm-instance resources is {cpu, sockets, memory} with vCPU =
cpu x sockets, while kubernetes-nodes is {cpu, memory}. One generic
reading undercharges by the socket factor; added resourcesShape.
- clickhouse needs shards x replicas, which a single count path
cannot express; count becomes a small recursive expression
supporting product and max.
Not adopted: CodeRabbit's claim that AAQ's VirtualResources prices
from the VirtualMachine. VirtLauncherCalculator resolves the pod's
owner through a VMI informer and PodUsageFunc receives the VMI; the
existing text is correct.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent cd21512 commit d78efc7
1 file changed
Lines changed: 279 additions & 102 deletions
0 commit comments