Repository navigation
Description
What
A custom tier lets a team size its own container limits (the LimitRange), not only its quota. Today NamespaceCreate has no field for them, and the custom tier renders a fixed LimitRange (in dev: container default 500m / 512Mi, default request 100m / 256Mi, max 2 CPU / 4Gi; PVC max 50Gi). A team that needs bigger containers cannot ask.
The owner's decision (2026-11-13)
"we shouldn't block a feature - we should add because what gate a feature is approval right? so as long it is approved we are good to go"
So the API accepts custom limits, and the approval rules are the gate. It does not refuse a value only because a person might not want it; it refuses only what is invalid, and sends the rest to approval.
The design to build (research and refine it, then record the choice)
- Request.
NamespaceCreate(and the change of an existing namespace) takes an optionallimitRangeobject withtier: custom, for example:Keys left out keep the custom tier's values, as the quota does today."limitRange": { "container": { "default": {"cpu": "1", "memory": "1Gi"}, "defaultRequest": {"cpu": "250m", "memory": "512Mi"}, "max": {"cpu": "4", "memory": "8Gi"} }, "pvc": { "max": {"storage": "100Gi"} } }
- Catalog.
tiers.yamlnames the sizable limit keys and gives each environment its bounds (min, max, step), the same way it does forsizablequota keys (TierCatalog.quota_for,cmapi/src/cmapi/core/tiers.py). - Validation (invalid, refused with a registered RFC 9457 problem): a key that is not sizable; a value outside the bounds or off its step;
defaultRequestabovedefault, ordefaultabovemax; a containermaxabove the namespace quota it lives in (it could never be scheduled). Each refusal has its problem code inPROBLEMS. - Approval (the gate): a new fact for
approval-rules.yaml, for examplecustomLimits(any limit key differs from the tier) andlimitIncreasePct, so a rule can require an approver, asquotaIncreasePctdoes today. The default rules require one approver from the platform group for custom limits; auto-approval never covers them unless a rule says so. - Plan and dry run: the rendered
limitrange.yamlshows the values;?dryRun=truereturns it with the approval decision; the Kyverno bundle validates it. - Contract: OpenAPI schema with descriptions and examples, a recorded sample, docs/04 regenerated, the oasdiff gate (an added optional field is not breaking), docs/02 and its live document updated.
- Portal: the New namespace tab offers the limits when the tier is custom, faithful to the mockup's style; the Approvals tab shows them.
Research to record, not decided by the owner: whether the same principle ("approval is the gate") should also open the quota keys that the custom tier fixes today (PVCs, storage, load balancers, NodePorts). Load balancers and NodePorts touch network exposure, so give the platform team's view and a recommendation.
Proof
- Tests that fail before and pass after: each refusal; a valid custom limit goes to
pending_approvalwith the platform slot; an approved one renders the LimitRange; a named tier withlimitRangeis refused. - The service suite, the portal suites, the contract gate and GitHub's six checks green on the exact head.
Activity
ephico2real2 commentedon Nov 14, 2026
Owner decisions, 2026-11-13 (later the same day):
Extra approval for anything beyond the tier. "the workflow is that we need extra approval for custom that is beyond what set in tiers." Any value that differs from (goes beyond) what the namespace's tier sets, on any governed resource (quota keys, LimitRange, and the other overridable objects of Kyverno policies generated from cmapi's configuration, with approved per-namespace overrides #212), adds an approval slot on top of the normal rule for that request. Express it in
approval-rules.yamlas a fact (for examplebeyondTier: true, with the list of keys) that each environment's rules use; auto-approval never covers it unless a rule says so explicitly. The plan and the dry run say which keys are beyond the tier and which extra approval they need.Kyverno messages parameterized from the configuration. "Kyverno messages can be parameterized so too to use the configured values as generic message stating -". Each rule's
messageis a generic template filled with the configured values and the offending value (for example "requests.cpu 40 is above the dev maximum of 32; ask for a custom tier with approval"), not a hard-coded number. The same values feed the policy, its message, cmapi's plan-time problem detail and the portal, so the four always agree. Verify Kyverno's variable substitution inmessagefor the pinned version, offline in the CLI as well as at admission.Merge pull request #224 from ephico2real2/custom-limitrange
ephico2real2 commentedon Nov 14, 2026
The API side is merged with PR #224 (
limitRange, the overridable quota keys, the factsbeyondTier,beyondTierKeysandnetworkExposure, the decision recorddocs/reviews/2026-11-14-issue-211/). Still open here: the portal items (the New namespace tab offers the limits on the custom tier; the Approvals tab shows the beyond-tier keys), with those tabs in Wave 6. Proof so far is native only: the service suite on the suite's fakes, no cluster (#157).Adoption design D19: two LimitRanges, CPU and memory, and none for st…
ephico2real2 commentedon Nov 19, 2026
Work tag In-Progress. Evidence: merged part(s) of this issue: #224. The issue stays open for the rest; status:partly-fixed. Moved up from Backlog (records sweep 2026-11-19).