Files
cozystack/packages
Mattia Eleuteri c368c48fd8 fix(controller, platform): give unbounded pool members the root's LimitRange
The tenant chart renders the tenant-range-limits LimitRange only next to
the tenant-quota of a tenant that declares resourceQuotas. Since quotas
became hierarchical, an unbounded sub-tenant shares its parent's pool
and gets a controller-owned tenant-quota-allocated ResourceQuota, but
still no LimitRange. A ResourceQuota on limits.cpu or limits.memory
makes admission reject any container that omits that limit, and with
no LimitRange nothing fills it in. Pods that ran before the quota was
introduced fail as soon as they are recreated; the barman-cloud plugin
sidecar, which sets no CPU limit, takes every backed-up postgres
instance in such a namespace down on its next restart.

The controller already knows which namespaces it clamps, so it copies
the pool root's chart LimitRange into each unbounded member, under its
own name so that Helm can still create the chart object if the tenant
later declares a quota of its own, and removes the copy once the
namespace leaves the pool.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
2026-11-10 09:03:55 +01:00
..