Set accelerator quotas Unreleased: coming in v1.3
Install the ome-quota-manager, split a cluster's GPUs among teams with an AcceleratorQuota tree, and charge workloads to each team's Kueue budget.
An AcceleratorQuota tree divides a cluster's accelerators among teams. The quota manager, ome-quota-manager, checks the tree and turns it into Kueue queues, which admit each team's workloads against its budget.
You install the quota manager and give 24 A100 GPUs to the group ml-research. You split them: 16 for team-alpha, and 8 for team-beta, which can borrow up to 4 more while team-alpha leaves them idle. Then you charge an InferenceService to a team.
How quotas work¶
AcceleratorQuotas, short name aq, are cluster-scoped and form a tree under root, which the quota manager creates. Every other node names its parent in spec.parentRef.name, and has one of two roles in spec.role:
- A
Cohortgroups other nodes, whose budgets add up to at most its own. It isn't a cap at run time: a team that borrows can take the group past it. - A
ClusterQueueis a team, with no children. Its workloads charge its budgets.
A budget in spec.budgets counts one resource on one Kueue ResourceFlavor, such as nvidia.com/gpu on a100. A Cohort's budget sets only nominal. A team's budget has three amounts:
| Field | Meaning |
|---|---|
nominal |
The team's share. Required. |
borrowingLimit |
How much more the team can borrow from the unused shares of any team in the tree, not only its siblings. Unset means 0. |
lendingLimit |
How much of its unused share other teams can borrow, at most nominal. Unset means all of it. |
A team's priorityTier has no effect in this release. A team can also set spec.preemption, which lets its pending workloads evict borrowers and take back its share: see Reclaim borrowed GPUs.
The quota manager writes a Cohort node to Kueue as a Cohort, and a team as a ClusterQueue with a LocalQueue in each enrolled namespace. Every team's ClusterQueue selects exactly the enrolled namespaces, so the enrollment is a boundary that Kueue enforces: a workload anywhere else is never admitted, whatever queue name it carries. These objects take their node's name and carry the label ome.io/quota-managed-by: ome-quota-manager.
The webhook denies a change that breaks a rule the tree doesn't already break. It judges a write by what it adds, not by the state it inherits, so the repair of a broken tree passes — and concurrent writes can jointly break a rule with no denial anywhere: Change the tree draws the boundary. A node can also break a rule later, when a budget is more than the peak capacity that the quota manager measures. Whatever the break, the quota manager freezes the node and its descendants: their Kueue objects stay as they were, so admitted workloads keep running. Each budget is checked against capacity on its own, so to cap the total, give root a budget.
The tree's depth is bounded: a node can be at most quotaManager.maxTreeDepth edges below root, 5 by default, counting root as 0, so ml-research sits at 1 and the teams at 2. The bound is a guardrail against accidental sprawl, not a Kueue limit. The webhook denies a node past it, naming both numbers: node is 6 levels below the root, exceeding the configured maximum of 5. To nest deeper, raise quotaManager.maxTreeDepth in quota-values.yaml and upgrade the release, as in Lower the high-water mark: the chart passes the value to the quota manager as its --max-tree-depth flag, and 0 turns the check off. Lowering the bound under a stored node's depth doesn't remove the node: it reports DepthExceeded and is frozen, like any node that breaks a rule.
The quota manager itself runs in one of two modes, and an install runs exactly one: the two write different halves of root's status. This page covers workload, which turns this cluster's tree into the Kueue objects above. The other mode, management, holds a fleet-wide tree and projects each cluster's share onto workload clusters. Its reconciliation is still in development, so don't build on it, or on the fields that exist for it: spec.distribution and budgets[].perCluster in the API, and the projection and remoteAccess values in the chart.
Step 1: Install the quota manager¶
The quota manager has no published image, so build one in your OME checkout. The binary is static, so an image built FROM scratch can hold it:
mkdir -p quota-image
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" \
-o quota-image/ome-quota-manager ./cmd/ome-quota-manager
cat > quota-image/Dockerfile <<'EOF'
FROM scratch
COPY ome-quota-manager /ome-quota-manager
USER 65532:65532
ENTRYPOINT ["/ome-quota-manager"]
EOF
docker build --platform linux/amd64 -t registry.example.com/ome/ome-quota-manager:dev quota-image
docker push registry.example.com/ome/ome-quota-manager:devdocker push uploads the image, tagged dev like the images from Install from source. For Arm nodes, set GOARCH=arm64 and --platform linux/arm64. The chart sets runAsNonRoot without a user ID, so the image needs its numeric USER.
Write the values. mode picks one of the two modes from How quotas work, here workload. It has no default: the chart fails to render without it, with an error that ends in quotaManager.mode must be "workload" or "management", got "". enrolledNamespaces lists the namespaces that the quotas govern; Remove a namespace from enrollment covers taking one out later. While it's empty, as it is by default, the quota manager writes nothing to Kueue:
global:
hub: registry.example.com/ome
quotaManager:
mode: workload
image:
tag: dev
materialize:
enrolledNamespaces:
- ml-servingThe chart then pulls registry.example.com/ome/ome-quota-manager:dev. For a registry that needs credentials, see Install from a private registry.
Install the chart:
helm install ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yaml --server-side=false--server-side=false keeps later upgrades from failing with a conflict over the webhook's CA bundle, as in Install OME.
helm install ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yamlThe release notes warn that the chart isn't installing the AcceleratorQuota CRD, and offer a value, quotaManager.crd.install, for a cluster where nothing else does. Leave it at its default, false: ome-crd installed the CRD here, as on any cluster that runs OME, and the CRD is one cluster-scoped object, so whichever release claims it second — this chart with crd.install: true, or an ome-crd installed later — fails Helm's ownership check.
Wait for both replicas:
kubectl -n ome rollout status deployment/ome-quota-managerdeployment "ome-quota-manager" successfully rolled outThe two replicas elect a leader, and only the leader does the work that follows; the other is a warm standby that also serves the webhook. Tune the leader election covers the takeover and its timing.
The quota manager then creates root:
kubectl get aq -o custom-columns=NAME:.metadata.name,ROLE:.spec.role,PARENT:.spec.parentRef.nameNAME ROLE PARENT
root Cohort <none>Step 2: Create the quota tree¶
The quota manager only reads Kueue ResourceFlavors, so create one that matches the A100 nodes:
apiVersion: kueue.x-k8s.io/v1beta2
kind: ResourceFlavor
metadata:
name: a100
spec:
nodeLabels:
nvidia.com/gpu.product: NVIDIA-A100-SXM4-80GBkubectl apply -f a100-flavor.yamlresourceflavor.kueue.x-k8s.io/a100 createdThe quota manager measures capacity when nodes change, and at least once a minute by default: see Check that capacity reporting is alive. It reports the measurement on root:
kubectl get aq root -o jsonpath='{range .status.capacity[*]}{.resourceName}{" "}{.resourceFlavor}{" "}{.allocatable}{" "}{.highWaterMark}{"\n"}{end}'google.com/tpu a100 0 0
nvidia.com/gpu a100 32 32The columns are a resource, a flavor, the accelerators on nodes that are Ready and not cordoned, and the high-water mark that budgets are checked against. The mark also counts cordoned and not-Ready nodes, so it stays put while you drain nodes: Lower the high-water mark explains when it comes down. Measured resources appear on all flavors, so google.com/tpu shows 0. A 0 doesn't say on its own whether the pool is empty or a flavor failed to claim the nodes: each entry's attribution block does, as Tell a measured zero from a mapping gap explains.
Write the tree once root lists your resource and flavor. Until then, a budget for them can report CapacityExceeded. The tree puts the Cohort ml-research under root, with two teams under it:
apiVersion: ome.io/v1beta1
kind: AcceleratorQuota
metadata:
name: ml-research
spec:
role: Cohort
parentRef:
name: root
budgets:
- resourceName: nvidia.com/gpu
resourceFlavor: a100
nominal: "24"
---
apiVersion: ome.io/v1beta1
kind: AcceleratorQuota
metadata:
name: team-alpha
spec:
role: ClusterQueue
parentRef:
name: ml-research
budgets:
- resourceName: nvidia.com/gpu
resourceFlavor: a100
nominal: "16"
---
apiVersion: ome.io/v1beta1
kind: AcceleratorQuota
metadata:
name: team-beta
spec:
role: ClusterQueue
parentRef:
name: ml-research
budgets:
- resourceName: nvidia.com/gpu
resourceFlavor: a100
nominal: "8"
borrowingLimit: "4"ml-research comes first: the webhook denies a team whose parent doesn't exist yet.
Apply the tree:
kubectl apply -f quota-tree.yamlacceleratorquota.ome.io/ml-research created
acceleratorquota.ome.io/team-alpha created
acceleratorquota.ome.io/team-beta createdCheck that the nodes are valid and written to Kueue:
kubectl get aq -o custom-columns='NAME:.metadata.name,ROLE:.spec.role,PARENT:.spec.parentRef.name,READY:.status.conditions[?(@.type=="Ready")].status,MATERIALIZED:.status.conditions[?(@.type=="Materialized")].status'NAME ROLE PARENT READY MATERIALIZED
ml-research Cohort root True True
root Cohort <none> True True
team-alpha ClusterQueue ml-research True True
team-beta ClusterQueue ml-research True TrueIf a node shows False, see A node isn't Ready or Materialized.
The quota manager has written the teams' ClusterQueues:
kubectl get clusterqueues.kueue.x-k8s.io -l ome.io/quota-managed-by=ome-quota-manager -o custom-columns=NAME:.metadata.name,COHORT:.spec.cohortNameNAME COHORT
team-alpha ml-research
team-beta ml-researchIt has also written their LocalQueues in ml-serving:
kubectl get localqueues.kueue.x-k8s.io -n ml-serving -l ome.io/quota-managed-by=ome-quota-manager -o custom-columns=NAME:.metadata.name,CLUSTERQUEUE:.spec.clusterQueueNAME CLUSTERQUEUE
team-alpha team-alpha
team-beta team-betaStep 3: Charge workloads to a team¶
To charge an InferenceService in ml-serving to team-beta, label it with the team's name:
metadata:
labels:
kueue.x-k8s.io/queue-name: team-betaOME copies the label to the pods of all components, and Kueue keeps the pods SchedulingGated until team-beta's ClusterQueue admits them.
On an OMENative component, OME keeps the label only when the pods request an accelerator in ome.controller.quotaAcceleratorResources, nvidia.com/gpu or google.com/tpu by default. The wait for admission doesn't count against the readiness deadline.
By default, Kueue admits each pod on its own, so a nearly full budget can admit part of a multi-node Instance: Admit multi-pod Instances whole makes Kueue admit and evict each Instance as one unit. Either way, size budgets in whole Instances, with room for an update, which by default starts new pods before the old ones drain.
To move a workload to another team, change the label. On OMENative, running pods keep charging the old team until the next rollout replaces them.
Once Kueue admits the pods, kubectl get aq team-beta shows their GPUs under ADMITTED, next to the team's share under NOMINAL. The figures also sum onto ml-research: see Read usage up the tree.
Admit multi-pod Instances whole¶
By default, each labeled pod is its own Kueue Workload, admitted on its own. For a multi-pod Instance — a leader and its workers — that unit is too small: on a nearly full budget, Kueue can admit the leader while a worker waits for quota, a gang that holds GPUs and can never serve, and a reclaim can evict one worker out of a running Instance.
The operator setting lifecycle.kueuePodGroups makes the Instance the unit. OME then puts the pods of a multi-pod Instance that carry the queue label into one Kueue pod group, which Kueue runs as one Workload: it admits the whole Instance or none of it, and evicts it whole when it preempts. Each Instance is its own group, so a component's Instances still admit one by one, and a single-pod Instance is unchanged — one pod is one Workload either way. The group is Kueue's admission unit, separate from the scheduler-plugins PodGroup that gang scheduling places with.
The setting is cluster-wide, in the lifecycle entry of the inferenceservice-config ConfigMap, which the ome-resources chart writes from ome.controller.lifecycle.kueuePodGroups. The chart leaves it unset, and OME has no built-in default: absent or false, every pod stays its own Workload. Turn it on in the ome-resources values, keeping the values from Install from source:
global:
hub: registry.example.com/ome
ome:
controller:
tag: dev
lifecycle:
kueuePodGroups: true
omeAgent:
tag: dev
modelAgent:
enabled: true
image:
tag: devhelm upgrade ome ./charts/ome-resources --namespace ome -f values.yamlHelm reports the upgrade, and the controller pods restart. Check the key that OME reads:
kubectl get configmap inferenceservice-config -n ome -o jsonpath='{.data.lifecycle}' | jq .kueuePodGroupstrueFrom then on, the pods of every queued multi-pod Instance carry the group:
| Key | Kind | Value |
|---|---|---|
kueue.x-k8s.io/pod-group-name |
Label | The group: the service, component, Instance index and incarnation, bounded to the 63-character label limit. Kueue names the group's Workload after it. |
kueue.x-k8s.io/pod-group-total-count |
Annotation | The Instance's pod count: the leader plus its workers. |
kueue.x-k8s.io/pod-group-serving |
Annotation | true: an inference server runs until it's replaced, so Kueue never treats the group as finished, and admits a pod recreated into the group while the group's Workload stays admitted. |
kueue.x-k8s.io/role-hash |
Annotation | The pod's runner name, such as leader or worker, so the group's Workload counts each role under its own name. |
Only pods that keep the queue label are grouped: a component whose pods request no listed accelerator loses the label, and the group with it.
A group lasts exactly one build of its Instance, and OME ends it itself. Kueue keeps its pod finalizer, kueue.x-k8s.io/managed, on every pod of a group until a replacement pod joins the group or the group's Workload is deleted — and OME recreates a pod under its old name, so the replacement can't exist until the old pod is gone. Left there, the finalizer would hold a rebuilt or torn-down Instance forever, with the group's Workload keeping the quota. So on every pass, OME removes the finalizer from a group's pods that are being deleted, and when every pod of a group is terminating, deletes the group's Workload, which returns the quota at once instead of when Kueue's garbage collection reaches it. What that means:
- A pod recreated into the same build rejoins its siblings' group, and Kueue admits it as the replacement without re-queueing the Instance.
- A rebuilt Instance, from a restart or an update attempt, has a new incarnation, so its new pods form a new group that queues for admission as one, while the old build's pods and Workload release their quota.
- A teardown — a scale-down, or deleting the InferenceService — ends each Instance's group with its pods.
OME releases only the groups it named, each Instance's own: a pod group that your pod template names itself, and any Workload that another controller owns, are left alone.
Read usage up the tree¶
Each node's status.budgets pairs every budget in its spec.budgets with what workloads hold against it, and the figures roll up: a team reports its own pods, and a Cohort reports what the teams underneath it consume. Every admitted GPU is charged to exactly one team, so the sum counts nothing twice. Say team-alpha's pods hold 12 GPUs and team-beta's hold 10, its 8 plus 2 borrowed:
kubectl get aq team-beta -o jsonpath='{range .status.budgets[*]}{.resourceName}{" "}{.resourceFlavor}{" nominal="}{.nominal}{" admitted="}{.admitted}{" reserved="}{.reserved}{" borrowed="}{.borrowed}{"\n"}{end}'nvidia.com/gpu a100 nominal=8 admitted=10 reserved=10 borrowed=2The same read on the Cohort shows the group's totals:
kubectl get aq ml-research -o jsonpath='{range .status.budgets[*]}{.resourceName}{" "}{.resourceFlavor}{" nominal="}{.nominal}{" admitted="}{.admitted}{" reserved="}{.reserved}{" borrowed="}{.borrowed}{"\n"}{end}'nvidia.com/gpu a100 nominal=24 admitted=22 reserved=22 borrowed=0Each entry carries four amounts:
| Amount | What it reports |
|---|---|
nominal |
The budget's nominal, echoed from the spec. |
admitted |
The GPUs admitted against the budget, borrowed ones included. On a Cohort, the teams' total. |
reserved |
The GPUs held by workloads with a quota reservation, admitted or not. Never below admitted: the gap is work that owns the GPUs but hasn't started. |
borrowed |
The admitted amount above the node's own nominal. |
On a team, borrowed is Kueue's own figure. On a Cohort, the quota manager recomputes it against the Cohort's own nominal rather than summing the teams': team-beta's 2 borrowed GPUs come from team-alpha's idle share, inside the group, so ml-research reports 0. A Cohort borrows only when its teams' total passes its own share — GPUs taken from outside the group.
The entries follow spec.budgets, so the list shows only what you authored. The CPU, memory and ephemeral storage ceilings that every ClusterQueue carries never appear, and a budget that nothing is charged to keeps an entry, its admitted, reserved and borrowed an explicit 0 under its nominal: a budget nobody is using, not a budget that doesn't exist. A node with no budgets reports no status.budgets at all — root has none on this page, so it shows nothing while the teams run the fleet. Give it a budget, as How quotas work suggests to cap the total, and it reports the whole tree's use.
The quota manager rereads what Kueue holds on every pass, and a change in what a queue holds wakes one, so the figures follow admissions. When it can't read Kueue, the last figures stand rather than being zeroed: unknown and nothing held are different answers. The figures are observational — Kueue admits against its own queues, not against them — so a stale number misleads only its reader. The metrics publish the same four amounts per node, as the ome_quota_budget_* gauges, and in kubectl get aq, NOMINAL and ADMITTED show the first budget's amounts, -o wide adds BORROWED, and reserved appears only in the full status.
Reclaim borrowed GPUs¶
In Read usage up the tree, team-beta holds 2 GPUs of team-alpha's share, and nothing takes them back while its pods run: an unset spec.preemption keeps Kueue's defaults, which disable preemption. Setting it on a team authorizes evictions for that team's pending workloads. Each field permits one kind:
| Field | Policies | What it permits |
|---|---|---|
reclaimWithinCohort |
Never, LowerPriority, Any |
Evicting other teams' borrowers in the cohort, to admit a pending workload that fits the team's own nominal. LowerPriority evicts only workloads of lower priority than the pending one; Any evicts them regardless of priority. |
withinClusterQueue |
Never, LowerPriority, LowerOrNewerEqualPriority |
Evicting the team's own admitted workloads to admit a pending one. LowerPriority evicts only workloads of lower priority than the pending one; LowerOrNewerEqualPriority also evicts newer workloads of its priority. |
borrowWithinCohort.policy |
Never, LowerPriority |
Evicting lower-priority borrowers so the pending workload can itself borrow. Borrowing idle GPUs needs no policy: this is for borrowing when none are idle. |
borrowWithinCohort.maxPriorityThreshold |
An integer | Only evicting, for borrowing, workloads whose priority is at most this value. It has no effect while policy is Never. |
Priority, where a policy compares it, is the workload's own. OME stamps none — a team's priorityTier has no effect in this release, as How quotas work says — so where no workload declares a priority, every workload ties, a tie isn't lower, and LowerPriority evicts nothing. That's why the example below uses Any.
The policies authorize, never shield: they work for the team that sets them, and they don't protect its running pods from another team's reclamation. And only a team can carry them. The API rejects preemption on a Cohort, root included, with an error that ends in only a ClusterQueue node may set preemption, and rejects borrowWithinCohort.policy: LowerPriority without a reclaimWithinCohort of Any or LowerPriority with one that ends in borrowWithinCohort.policy LowerPriority requires reclaimWithinCohort Any or LowerPriority. The quota manager re-checks the same rules on every pass, and a node that gets one past admission is frozen with NodeKindInvalid, as in A node isn't Ready or Materialized. Kueue adds a limit of its own: it doesn't support borrowing-driven preemption while its Fair Sharing feature is on.
To let team-alpha take its share back, add preemption to it in quota-tree.yaml, keeping the rest of the file:
apiVersion: ome.io/v1beta1
kind: AcceleratorQuota
metadata:
name: team-alpha
spec:
role: ClusterQueue
parentRef:
name: ml-research
preemption:
reclaimWithinCohort: Any
budgets:
- resourceName: nvidia.com/gpu
resourceFlavor: a100
nominal: "16"kubectl apply -f quota-tree.yamlacceleratorquota.ome.io/ml-research unchanged
acceleratorquota.ome.io/team-alpha configured
acceleratorquota.ome.io/team-beta unchangedThe quota manager writes the fields you set into the team's ClusterQueue, and only those — Kueue's defaults stand for the rest there too:
kubectl get clusterqueues.kueue.x-k8s.io team-alpha -o jsonpath='{.spec.preemption.reclaimWithinCohort}{"\n"}'AnyFrom then on, a pending team-alpha workload that fits the team's 16 no longer waits on the borrowed GPUs: Kueue evicts team-beta's workloads — the queue holding more than its own nominal of 8 — until the pending pods fit, and admits them.
Change the tree¶
Edit quota-tree.yaml and apply it again. To check a change without writing it, add --dry-run=server: the webhook still runs, and kubectl marks the objects (server dry run).
Raising team-alpha to 20, for example, would bring the children of ml-research to 28, more than its 24. The apply fails with an error that ends in admission webhook "acceleratorquota.ome-quota-manager.validator" denied the request: ml-research: budget nvidia.com/gpu on a100 is 24 but its children total 28.
That denial counts on the tree being healthy when the write arrives. The webhook rebuilds the whole tree as the write would leave it — a rule like containment belongs to parent and children together, not to the object you wrote, which is why the denial names ml-research — and compares the broken rules before and after. What it denies is the break the write adds: the same rule on the same node about the same subject, here the budget nvidia.com/gpu on a100, is the same break however its numbers move. On a tree that breaks no rule, every break is added by the write, so every breaking change is denied. On a tree already breaking one:
- A repair passes. When
ml-researchalready reportsContainmentViolated, the apply that brings its children's total back under its 24 is admitted. A webhook that denied every write leaving the tree broken would deny the fix too. - Widening the same break also passes, by design. With the children already at 28, raising
team-alphafurther is admitted — that budget onml-researchwas already over — and the freeze reports it, as in A node isn't Ready or Materialized, not a denial. - A break the tree doesn't already have is denied as usual: an overrun on a budget that wasn't over, a
parentRefthat doesn't resolve, a delete that orphans children.
The webhook is fast feedback, not the authority. Admission can't order concurrent writes, so two applies that each pass — each checked against the tree before the other landed — can jointly take ml-research's children past its budget, with no denial anywhere. The quota manager re-checks the same rules on every pass and freezes what slips through: the overrun surfaces as Ready=False with ContainmentViolated on the node, not as an error on any write. So a passing apply, dry run or real, says that the change adds no break, not that the tree is healthy. Check READY, as in Step 2, or run kubectl ome quota validate.
To move a team under another Cohort, point its spec.parentRef.name at the new parent: parentRef is mutable, and the quota manager updates the team's ClusterQueue in place. Kueue object names come from a node's name, never from its place in the tree, so nothing is deleted or recreated: the queue, its LocalQueue in ml-serving and its admitted workloads all survive the move. Say team-beta becomes its own group. In quota-tree.yaml, add the Cohort ml-platform before team-beta — the webhook denies a team whose parent doesn't exist yet — and point team-beta at it:
apiVersion: ome.io/v1beta1
kind: AcceleratorQuota
metadata:
name: ml-platform
spec:
role: Cohort
parentRef:
name: root
budgets:
- resourceName: nvidia.com/gpu
resourceFlavor: a100
nominal: "12"
---
apiVersion: ome.io/v1beta1
kind: AcceleratorQuota
metadata:
name: team-beta
spec:
role: ClusterQueue
parentRef:
name: ml-platform
budgets:
- resourceName: nvidia.com/gpu
resourceFlavor: a100
nominal: "8"
borrowingLimit: "4"kubectl apply -f quota-tree.yamlacceleratorquota.ome.io/ml-research unchanged
acceleratorquota.ome.io/ml-platform created
acceleratorquota.ome.io/team-alpha unchanged
acceleratorquota.ome.io/team-beta configuredThe ClusterQueue team-beta is the same object with a new cohort, not a replacement:
kubectl get clusterqueues.kueue.x-k8s.io -l ome.io/quota-managed-by=ome-quota-manager -o custom-columns=NAME:.metadata.name,COHORT:.spec.cohortNameNAME COHORT
team-alpha ml-research
team-beta ml-platformIts pods keep running and keep charging team-beta, whose usage now sums onto ml-platform instead of ml-research, as in Read usage up the tree. The webhook judges a move by what it alone breaks: the new parent must exist and be a Cohort, since a team takes no children; the node can't become its own ancestor or go past the depth bound; and its budgets must fit the new parent's — a team too big for its new Cohort fails with the same children total error as above, against the new parent's budget. Removing the team from ml-research can't break a rule: its children then total less. A Cohort moves the same way, and its subtree comes along unchanged, because children name their parent, not their path.
To change a node's role, on the other hand, delete the node and create it again: changing spec.role in place leaves the old Kueue object behind.
Remove a namespace from enrollment¶
To stop serving budgeted workloads from a namespace, remove it from enrolledNamespaces and upgrade the release. The list is one boundary for the whole install, as How quotas work says, so the removal cuts every team off from the namespace at once. Say ml-batch had been enrolled alongside ml-serving, and its teams have moved out. Drop it from the list, keeping the other values in the file:
global:
hub: registry.example.com/ome
quotaManager:
mode: workload
image:
tag: dev
materialize:
enrolledNamespaces:
- ml-servinghelm upgrade ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yamlHelm reports the upgrade, and the quota manager's pods restart with the new list: the chart passes it to the quota manager as its --enrolled-namespaces flag. On the first pass after the restart, the quota manager rewrites every team's ClusterQueue to select only the namespaces that remain. The selector names them by kubernetes.io/metadata.name:
kubectl get clusterqueues.kueue.x-k8s.io -l ome.io/quota-managed-by=ome-quota-manager \
-o jsonpath='{range .items[*]}{.metadata.name}{" "}{.spec.namespaceSelector.matchExpressions[0].values}{"\n"}{end}'team-alpha ["ml-serving"]
team-beta ["ml-serving"]Kueue enforces the selector, so from that pass on no team admits workloads from ml-batch. The one exception is a frozen node: its queue keeps its last-good selector, the removed namespace included, until the node is repaired. What the namespace already holds doesn't vanish with the enrollment:
- Admitted pods keep running and keep charging their team: a queue evicts only what a team's
spec.preemptionauthorizes, and serving pods otherwise run until you delete them, as the borrowing warning in Step 2 says. Deleting them is what frees the budget. - The pods of new labeled workloads, and the ones that were still waiting, stay
SchedulingGatedfor good. OME leaveskueue.x-k8s.io/queue-nameoff a pod only by its resource requests, never by its namespace, so Kueue keeps gating the pods, and no queue admits them. Stop labeling the workloads there, or delete them.
The teams' LocalQueues in ml-batch are also left behind. The sweep deletes an object only when its node is gone from the tree — it keeps everything whose ome.io/accelerator-quota label names a node that still exists, in any namespace — and a namespace off the list is simply no longer rendered, so the LocalQueues are neither swept nor written again. They're orphans that make the namespace look enrolled. Delete them:
kubectl delete localqueues.kueue.x-k8s.io -n ml-batch -l ome.io/quota-managed-by=ome-quota-managerlocalqueue.kueue.x-k8s.io "team-alpha" deleted
localqueue.kueue.x-k8s.io "team-beta" deletedThe quota manager doesn't recreate them, and the Workload of a labeled pod in ml-batch then reports LocalQueue team-beta doesn't exist, the clear symptom from Pods stay SchedulingGated, instead of resolving a queue that never admits it. Enrolling the namespace again brings the LocalQueues back with the same upgrade; left in place, they're deleted only when their teams are.
Lower the high-water mark¶
Each budget is checked against its resource and flavor's high-water mark on root, not against the capacity of the moment. The mark is a running peak of the installed capacity: the accelerators on every node, the cordoned and not-Ready ones included. It's damped, so it ignores dips that say nothing about what the teams are entitled to, such as a drain, a rolling reboot or a restarting device plugin:
- Growth is believed at once: a measurement above the mark raises it to the new installed capacity.
- A drop is believed only when the installed capacity falls below the mark by more than the band:
quotaManager.capacity.hysteresisPercentpercent of the mark, 10 by default, which the chart passes to the quota manager as its--capacity-hysteresis-percentflag. The mark then falls all the way to the new installed capacity, not to the edge of the band.
So the mark comes down within a minute when a decommission takes the installed capacity past the band. Deleting one of the four A100 nodes leaves 24 GPUs installed, 25% below the mark of 32, so the mark falls to 24, and a budget over 24 reports CapacityExceeded. But the band is a magnitude, not a wait: retire 2 of the 32 GPUs instead, 6.25%, and the mark stays at 32 for good, so the tree keeps accepting budgets for 2 GPUs that are gone. The marks live in root's status, so restarting the quota manager doesn't lower them either.
To bring the mark down after a decommission within the band, turn the damping off and let the quota manager measure. Set hysteresisPercent to 0, keeping the other values in the file:
global:
hub: registry.example.com/ome
quotaManager:
mode: workload
image:
tag: dev
capacity:
hysteresisPercent: 0
materialize:
enrolledNamespaces:
- ml-servinghelm upgrade ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yamlHelm reports the upgrade, and the quota manager's pods restart with the damping off. Within a minute, the mark matches the installed capacity:
kubectl get aq root -o jsonpath='{range .status.capacity[*]}{.resourceName}{" "}{.resourceFlavor}{" "}{.allocatable}{" "}{.highWaterMark}{"\n"}{end}'google.com/tpu a100 0 0
nvidia.com/gpu a100 30 30Then set hysteresisPercent back to 10, or remove it from the file, and upgrade again.
A pair that stops being measured at all, because the last node that carried it is gone, you delete its ResourceFlavor, or you remove its resource from quotaManager.capacity.resources, keeps its last mark and reports 0 allocatable, whatever the band. Turning the damping off doesn't lower this mark either: the band judges measurements, and a pool with no hardware isn't measured at zero, it isn't measured at all, so no reading arrives for the mark to follow down. The entry stays in root's status as the record of what the pair once held, and the mark moves again only when nodes report the pair again: at once when the new installed capacity is above it, past the band when it's below. So when you retire a pool for good, also delete the budgets that name its resource and flavor. Each one keeps passing its check against the stale mark, promising teams accelerators that no node has.
Check that capacity reporting is alive¶
On stable hardware, the numbers on root stop changing, so they can't tell a healthy cluster from a quota manager that stopped measuring. What tells the two apart is observedAt on each entry of root's status.capacity, the time of the last measurement:
kubectl get aq root -o jsonpath='{range .status.capacity[*]}{.resourceName}{" "}{.resourceFlavor}{" "}{.observedAt}{"\n"}{end}'google.com/tpu a100 2026-10-05T09:41:12Z
nvidia.com/gpu a100 2026-10-05T09:41:12ZThe quota manager measures on a timer: the smaller of quotaManager.resyncInterval, 10 minutes by default, and the report interval, quotaManager.capacity.reportInterval, 1 minute by default, which the chart passes to the quota manager as its --capacity-report-interval flag. It also measures at once when an AcceleratorQuota is written, or when a node is added or deleted, cordoned or uncordoned, relabeled, or changes its readiness or its accelerators. Creating a ResourceFlavor triggers no measurement, so a new flavor shows up on root with the next one: the wait before the tree in Step 2.
A measurement that changes what root reports is written at once. The report interval bounds the rest: a measurement that finds the stamps a report interval old writes them anew, even though the numbers stand. So with the defaults, a quota manager that measures keeps every observedAt within about a minute of now, and the stamps say that the reporting is alive, not that the hardware changed.
A stamp well past the report interval means that the measuring stopped, and with it everything this page describes: nothing raises the mark for new nodes, or lowers it for retired ones. A measurement that fails, such as a node list the API server refuses, doesn't refresh the stamps either, so check the quota manager's pods and their logs. Setting reportInterval to "" or 0s turns the refresh off, and the timer falls back to resyncInterval: observedAt then dates the last change of the numbers, and a reporter that stopped no longer shows.
Tell a measured zero from a mapping gap¶
On this cluster, the 0 that google.com/tpu shows on root is a measured zero: every node was measured, and none advertises a TPU. But the same 0 appears when the hardware is there and the measurement couldn't claim it. A node that matches no ResourceFlavor, or two equally specific ones, is counted into no pool, so a wrong value in the A100 nodes' product label would leave nvidia.com/gpu at 0 with 32 GPUs installed. What tells the two apart is attribution on each entry of root's status.capacity, the record of the mapping behind the numbers:
kubectl get aq root -o jsonpath='{range .status.capacity[*]}{.resourceName}{" "}{.resourceFlavor}{" "}{.allocatable}{" "}{.attribution.complete}{"\n"}{end}'google.com/tpu a100 0 true
nvidia.com/gpu a100 32 truecomplete is true only when every node advertising the entry's resource was attributed to exactly one flavor, and every flavor carried a verifiable identity. On a 0, true means the zero was measured, not missed: no Ready, uncordoned node carries the pair, and hardware parked on cordoned or not-Ready nodes still shows in the high-water mark. false means a node advertising the resource matched no flavor, or several equally specifically, so every number for that resource can undercount. One unclaimed node marks the whole resource: every nvidia.com/gpu entry turns incomplete, on every flavor, while the google.com/tpu entries stay complete. The block doesn't name the nodes: the ome_quota_capacity_unattributed metrics hold the amounts and the reason, NoMatchingFlavor or AmbiguousFlavor. Create the flavor the nodes lack, or fix the labels, and the next measurement sets complete back to true.
The other three fields record which mapping measured the entry:
| Field | What it records |
|---|---|
flavorUID |
The UID of the entry's ResourceFlavor. A flavor deleted and recreated under the same name is a different UID. |
nodeLabels |
The flavor's spec.nodeLabels when the entry was measured, kept even after the flavor changes. Absent on a flavor with no labels, which matches every node. |
flavorSetHash |
A hash of the whole mapping: every ResourceFlavor's name, UID and node labels, and the measured resource list. Any flavor's change moves it, not only this entry's, because a more specific flavor elsewhere can take this pool's nodes. |
The mapping is part of the status: a measurement that finds a new flavorSetHash rewrites every entry at once, whether or not a number moved. A flavor edit still waits for the next measurement, like a new flavor in Check that capacity reporting is alive: within about a minute with the defaults.
An entry carries the block only while the mapping produces its pair: the flavor exists, and the resource is in quotaManager.capacity.resources. When either goes, the next measurement removes the block, and keeps the entry only while it has a high-water mark above 0 to remember. So google.com/tpu's all-zero entry vanishes with its flavor, and an entry without attribution is that leftover record: nothing vouches for its 0 allocatable, and its mark stands still, as the end of Lower the high-water mark warns.
Budget other accelerators¶
Two lists, one in each chart, decide which resources count as accelerators:
| Helm value | Chart | Default | What it decides |
|---|---|---|---|
quotaManager.capacity.resources |
ome-quota-manager |
google.com/tpu, nvidia.com/gpu |
The resources that the quota manager measures. A budget for any other resource reports CapacityExceeded. |
ome.controller.quotaAcceleratorResources |
ome-resources |
nvidia.com/gpu, google.com/tpu |
The resources that keep the queue label on an OMENative component, as the controller's --accelerator-resources flag. Pods that request none of them charge no budget. |
ome.controller.acceleratorResources, without quota, is a different list, unrelated to quotas.
To budget AMD GPUs as well, add amd.com/gpu to both lists. In the quota manager's values:
global:
hub: registry.example.com/ome
quotaManager:
mode: workload
image:
tag: dev
capacity:
resources:
- amd.com/gpu
- google.com/tpu
- nvidia.com/gpu
materialize:
enrolledNamespaces:
- ml-servinghelm upgrade ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yamlHelm reports the upgrade, and the quota manager's pods restart with the new list.
Then add it to the ome-resources values. Keep the values from Install from source in the file, because helm upgrade -f resets every value that the file leaves out:
global:
hub: registry.example.com/ome
ome:
controller:
tag: dev
quotaAcceleratorResources:
- nvidia.com/gpu
- google.com/tpu
- amd.com/gpu
omeAgent:
tag: dev
modelAgent:
enabled: true
image:
tag: devhelm upgrade ome ./charts/ome-resources --namespace ome -f values.yamlHelm reports the upgrade, and the controller pods restart with the new list.
Tune the leader election¶
The chart runs two replicas of the quota manager, set by quotaManager.replicaCount. They elect a leader through the Lease ome-quota-manager-leader-lock, and only the leader reconciles: it measures capacity, writes every node's status and writes the Kueue objects, so the metrics move only on the leader. The other replica is a warm standby. Both replicas serve the webhook, the metrics endpoint and the probes, which is why admission returns with the first ready pod. Keep quotaManager.leaderElect at its default, true, whenever replicaCount is above 1: two active instances would race each other's status writes on every node. See which pod leads:
kubectl get lease ome-quota-manager-leader-lock -n ome -o jsonpath='{.spec.holderIdentity}{"\n"}'ome-quota-manager-6f8b9c7d54-plwdr_8a1f2c3d-4e5b-6a7c-8d9e-0f1a2b3c4d5eThe part before the _ is the leader's pod name.
Three values in quotaManager.leaderElection time the election, and the chart passes them to the quota manager as its --leader-elect-lease-duration, --leader-elect-renew-deadline and --leader-elect-retry-period flags: a lease duration of 120 seconds, a renew deadline of 40 seconds and a retry period of 8 seconds by default.
The leader renews the Lease every retry period. Each renewal request waits at most half the renew deadline, 20 seconds with the chart, so the deadline holds two attempts, and the leader survives one hung request: a routine API server stall costs the first attempt, and the second renews the Lease. A leader that can't renew within the deadline gives up, logs problem running manager with the error leader election lost and exits, and Kubernetes restarts the container.
How soon the standby takes over depends on how the leader stopped. A leader stopped on purpose — a rollout, a node drain, a pod deletion — releases the Lease at the end of its stop, because quotaManager.leaderElection.releaseOnCancel is true by default and the chart passes it as the --leader-elect-release-on-cancel flag. The standby takes a released Lease at its next poll, within 2.2 retry periods: about 18 seconds with the chart's timing. A crash or a lost node releases nothing — and a leader that gave up on failed renewals can only try, against the API server that just failed them — so after those, the standby waits until the Lease has gone unrenewed for the lease duration: the work this page describes pauses for up to two minutes. Admission doesn't pause either way: the webhook keeps serving from the standby.
The release comes after the stop, not instead of it: on SIGTERM the quota manager first stops its controllers and servers, waiting at most controller-runtime's 30-second stop timeout, and only then releases the Lease. That's why the chart sets the pod's quotaManager.terminationGracePeriodSeconds to 40: when the grace period runs out first, the kubelet's SIGKILL cuts the release off, and the Lease expires as usual. A healthy stop takes about a second and the pod exits as soon as it's done, so the 40 seconds are only a ceiling — but keep the value above 30.
When the leader keeps restarting with leader election lost during API server slowdowns, raise the three values together, keeping the other values in the file:
global:
hub: registry.example.com/ome
quotaManager:
mode: workload
image:
tag: dev
leaderElection:
leaseDuration: "180s"
renewDeadline: "60s"
retryPeriod: "12s"
materialize:
enrolledNamespaces:
- ml-servinghelm upgrade ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yamlHelm reports the upgrade, and the quota manager's pods restart with the new timing.
Keep the lease duration longer than the renew deadline, and the renew deadline longer than 1.2 times the retry period. The release adds a third rule, checked only while leaderElect is on, since without the election the release does nothing: the lease duration, in whole seconds, must exceed half the renew deadline (at least 1 second), plus the retry period, plus twice the renew deadline. Counted from the last renewal the standby reads, that sum is the longest a leader whose renewals fail can still be acting — one request timeout waiting for a reply, one retry period, one renew deadline of failed retries, and one more renew deadline to release the Lease on its way out — and a shorter lease would let the standby take over while the old leader still reconciles. The example clears it: 30 + 12 + 120 = 162 seconds, under its 180-second lease. A 90-second lease beside the same 60-second renew deadline fails it, with --leader-elect-release-on-cancel needs --leader-elect-lease-duration above 162s, and it is 90s, an error that adds up each amount. The quota manager checks the rules when it starts: when the values break one, every new pod logs bad flag, with an error that gives the values and the rule, and exits, so the rollout doesn't finish and the old pods keep the old timing.
Also set the three together. When any one is empty, the chart passes none of the three timing flags — but it still passes --leader-elect-release-on-cancel, and the quota manager refuses to start, with --leader-elect-release-on-cancel needs --leader-elect-lease-duration, --leader-elect-renew-deadline and --leader-elect-retry-period, because it checks the lease against the other two: the release rule can't be checked against controller-runtime's own timing. That fallback timing — a 15-second lease, a 10-second renew deadline and a 2-second retry period, whose 5-second renewal requests a routine stall outlasts — comes back only with releaseOnCancel: false beside the empty value. Longer values slow the failover after a crash, since the standby waits out the lease duration, so raise them only as far as your API server needs. The OME controller manager times its leader election the same way: see Lease timing.
Metrics¶
The quota manager serves Prometheus metrics on port 8080, at /metrics. OME's bundled Prometheus scrapes it when both releases are in ome: see Collect metrics. For the Prometheus Operator, set quotaManager.metrics.serviceMonitor.enabled: true, and put the labels that your Prometheus selects in quotaManager.metrics.serviceMonitor.additionalLabels.
| Metric | Labels | Value |
|---|---|---|
ome_quota_capacity_allocatable |
resource, flavor |
Accelerators on Ready, uncordoned nodes. |
ome_quota_capacity_unavailable |
resource, flavor |
Accelerators on cordoned or not-Ready nodes. |
ome_quota_capacity_nodes |
resource, flavor, state |
The nodes behind the two counts above: state is schedulable for the Ready, uncordoned ones, unavailable for the rest. It tells a one-machine shortfall from a rack. |
ome_quota_capacity_unattributed |
resource, reason |
Accelerators on nodes that match no flavor (NoMatchingFlavor) or several (AmbiguousFlavor). |
ome_quota_capacity_unattributed_nodes |
reason |
The nodes behind the unattributed accelerators, by the same reasons. A node counts once, even when several of its resources match no flavor. |
ome_quota_budget_nominal |
plane, quota, role, resource, flavor |
A budget's nominal. quota is the node's name. |
ome_quota_budget_admitted |
Same | Accelerators admitted against the budget, borrowed ones included. |
ome_quota_budget_reserved |
Same | Accelerators held by workloads with a quota reservation, admitted or not. |
ome_quota_budget_borrowed |
Same | Accelerators admitted above nominal. |
ome_quota_backend_applied_total |
None | Kueue objects written. The writes repeat on every pass, changed or not, so the count grows with how often the quota manager writes, not with your edits to the tree. |
ome_quota_backend_swept_total |
trigger |
Kueue objects deleted as orphans, by trigger: materialize for a pass that finds objects the tree no longer names, finalize for a deleted node's own objects. |
On the budget gauges, plane is the quota manager's mode, so on this page's install it's always workload. The label exists because a management-mode install publishes the same four series with other meanings, nominal being the authored fleet total rather than one cluster's share, so a query must never sum the two planes.
The capacity gauges are a snapshot of the last measurement, rewritten whole, so a series disappears when its cause does: create the flavor that NoMatchingFlavor points at, and the unattributed series are gone with the next measurement. The two counters say whether the writing to Kueue is alive. ome_quota_backend_applied_total keeps rising while the quota manager materializes, even on a cluster where nothing changes; a counter that stands still means that nothing is written, because enrolledNamespaces is empty, every node is frozen or the quota manager stopped. ome_quota_backend_swept_total moves only when a sweep deletes something, so standing still is its steady state.
Let a group manage quotas¶
A ClusterRoleBinding to the built-in view, edit or admin role already lets users read AcceleratorQuotas. To let a group edit the tree, bind it to a ClusterRole of its own. Leave out acceleratorquotas/status, which only the quota manager writes:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: accelerator-quota-admin
rules:
- apiGroups: ["ome.io"]
resources: ["acceleratorquotas"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: accelerator-quota-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: accelerator-quota-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: quota-adminskubectl apply -f accelerator-quota-admin.yamlclusterrole.rbac.authorization.k8s.io/accelerator-quota-admin created
clusterrolebinding.rbac.authorization.k8s.io/accelerator-quota-admin createdLet cert-manager issue the webhook certificate¶
By default, the quota manager manages the webhook's certificate itself: quotaManager.webhook.internalCertManagement is true, the chart creates the Secret ome-quota-manager-webhook-cert empty, and on startup the quota manager generates the CA and the serving certificate, keeps them rotated in the Secret, and injects the CA bundle into the ValidatingWebhookConfiguration ome-quota-manager.ome.io. The webhook needs no cert-manager in the cluster.
The self-injection comes with RBAC: the chart grants the quota manager update on the ValidatingWebhookConfiguration, scoped to its own by name, with list and watch on the whole kind, which can't be scoped to one object, and a Role whose list and watch expose every Secret in ome, to keep the cert Secret rotated.
To drop both grants, have cert-manager issue the certificate instead — Install OME put it on the cluster. Set internalCertManagement to false, at the install in Step 1 or in an upgrade, keeping the other values in the file:
global:
hub: registry.example.com/ome
quotaManager:
mode: workload
image:
tag: dev
materialize:
enrolledNamespaces:
- ml-serving
webhook:
internalCertManagement: falsehelm upgrade ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yamlHelm reports the upgrade. In place of the empty Secret, the chart renders a self-signed Issuer, ome-quota-manager-selfsigned, and a Certificate, ome-quota-manager-serving-cert, which cert-manager issues into the same Secret, ome-quota-manager-webhook-cert, with the webhook Service's DNS names. The ValidatingWebhookConfiguration carries cert-manager.io/inject-ca-from: ome/ome-quota-manager-serving-cert, so cert-manager's cainjector keeps the CA bundle current. The quota manager's pods restart reading the mounted Secret and rotating nothing, and the release carries neither the webhook-configuration grants nor the Secrets Role.
Both paths put the same two DNS names on the certificate: the webhook Service's name, ome-quota-manager-service.ome.svc, which the API server dials, and the fully qualified ome-quota-manager-service.ome.svc.cluster.local. One value sets the domain in the second, on both paths: quotaManager.clusterDomain, cluster.local by default. Under the default internal management, the chart passes it to the quota manager as its --cluster-domain flag; with cert-manager issuing, the chart writes the fully qualified name into the Certificate's dnsNames. The quota manager has no built-in domain, so the value is the only source: left empty, the certificate covers the short name alone on either path, and under internal management the quota manager notes it at startup, with --cluster-domain is not set; the webhook certificate covers only <service>.<namespace>.svc, not a fully qualified name.
On a cluster whose DNS domain isn't cluster.local, set the value to the real domain. Admission doesn't depend on it — the API server dials the short name, which both paths always cover — but an in-cluster client that calls the webhook Service by its fully qualified name fails TLS verification until the certificate covers the name it dials. Set the domain at the install in Step 1, or in an upgrade, keeping the other values in the file:
global:
hub: registry.example.com/ome
quotaManager:
mode: workload
clusterDomain: internal.example
image:
tag: dev
materialize:
enrolledNamespaces:
- ml-servinghelm upgrade ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yamlHelm reports the upgrade. Under the default internal management, the quota manager's pods restart with the new flag; with cert-manager issuing, the upgrade rewrites the Certificate's dnsNames, and cert-manager reissues into the Secret.
Who issues the certificate also decides how a broken cert heals: cert-manager recreates a deleted Secret on its own, where the default wedges the webhook, as Troubleshooting explains.
Troubleshooting¶
kubectl apply fails with a webhook error¶
A denial names the node and the rule that the change breaks. A failure to call the webhook means that no quota manager pod is ready. The webhook fails closed, so every create, update and delete of an AcceleratorQuota fails until one is.
kubectl -n ome get pods shows why the pods aren't ready. A cause outside the webhook, such as an image the nodes can't pull, you fix as usual, and admission returns with the first ready pod. But the webhook itself can be the cause: a pod reports ready only once its webhook serves, so when the webhook's certs are broken — the Secret ome-quota-manager-webhook-cert deleted, for example — no pod can become ready. Who issues the certificate decides whether that clears: cert-manager recreates a deleted Secret on its own, and the pods turn ready with it. By default, though, the quota manager updates the Secret and never creates it, so the wedge doesn't clear on its own.
To recover, disable the webhook: set quotaManager.webhook.enabled to false, keeping the other values in the file, and upgrade the release. The webhook gates only AcceleratorQuotas, so the wedge doesn't block the upgrade itself:
global:
hub: registry.example.com/ome
quotaManager:
mode: workload
image:
tag: dev
materialize:
enrolledNamespaces:
- ml-serving
webhook:
enabled: falsehelm upgrade ome-quota-manager ./charts/ome-quota-manager \
--namespace ome -f quota-values.yamlHelm reports the upgrade. It removes the ValidatingWebhookConfiguration ome-quota-manager.ome.io, so quota writes go through at once, and the pods restart without the webhook or its certs, so they become ready and the quota manager reconciles again.
Fix the cause, then set enabled back to true, or remove webhook from the file, and upgrade again. The upgrade restores the webhook's objects, and for broken certs it is the fix. By default, the chart recreates the Secret empty when it's gone, and on startup the quota manager generates the serving certificate, injects the CA bundle into the new ValidatingWebhookConfiguration, and reports ready once the webhook serves. With cert-manager issuing, the restored Certificate has cert-manager reissue into the Secret, and cainjector fills the new configuration's CA bundle. The restored webhook fails closed from the moment the upgrade creates it, so quota writes fail again until a pod is ready. Wait for the rollout:
kubectl -n ome rollout status deployment/ome-quota-managerdeployment "ome-quota-manager" successfully rolled outThen confirm that admission answers:
kubectl apply -f quota-tree.yaml --dry-run=serveracceleratorquota.ome.io/ml-research unchanged (server dry run)
acceleratorquota.ome.io/ml-platform unchanged (server dry run)
acceleratorquota.ome.io/team-alpha unchanged (server dry run)
acceleratorquota.ome.io/team-beta unchanged (server dry run)Pods stay SchedulingGated¶
kubectl describe workloads -n ml-serving shows why Kueue holds a pod. The usual causes:
- The team's quota is in use, by its own pods or by a team that borrowed it. A borrower is evicted for the waiting pod only when the team reclaims.
- Part of a multi-node Instance was admitted, and the rest stays gated. Per-pod admission, the default, can admit a gang piecewise on a nearly full budget. Turn on
lifecycle.kueuePodGroups: from the next rollout, Kueue admits each Instance whole or not at all. - The Workload reports
LocalQueue team-beta doesn't exist. Add the namespace toenrolledNamespaces. - The namespace has been removed from
enrolledNamespaces. A left-behind LocalQueue still resolves, so the Workload finds its queue, but no ClusterQueue selects the namespace any more, and nothing admits the pod. Enroll the namespace again, or stop labeling workloads there. - The pod requests a resource missing from its ClusterQueue, such as an RDMA device.
A ClusterQueue lists its team's accelerators, plus CPU, memory and ephemeral storage with ceilings too high to limit anyone. To admit another resource, give it a ceiling in coverResources, and upgrade the release as in Budget other accelerators. Helm merges the map, so the defaults stay:
quotaManager:
materialize:
coverResources:
rdma/hca_shared_devices_a: 1MPods run without charging a budget¶
Check that the pods carry kueue.x-k8s.io/queue-name, and that Kueue's pod integration is on. On OMENative, OME removes the label from pods that request no listed accelerator: see Budget other accelerators.
A node isn't Ready or Materialized¶
Read the node's conditions with their messages:
kubectl get aq team-beta -o jsonpath='{range .status.conditions[*]}{.type}{"="}{.status}{" "}{.reason}{": "}{.message}{"\n"}{end}'Ready=True Admitted: node is a valid member of the quota tree
Degraded=False Admitted: no invariant violated
Materialized=True Admitted: enforcement objects match this node's budgetDegraded is the opposite of Ready, with the same reason. Materialized is set only while enrolledNamespaces lists a namespace. The reasons for False:
| Condition | Reason | Meaning |
|---|---|---|
Ready |
CapacityExceeded |
A budget on the node or an ancestor is over the high-water mark on root, or root measures nothing for its resource and flavor. |
Ready |
DepthExceeded |
The node is more than quotaManager.maxTreeDepth edges below root, 5 by default: see How quotas work. The message gives its depth and the bound. Flatten the tree, or raise the bound. |
Ready |
ContainmentViolated, ParentMissing, ParentCycle, Unreachable or NodeKindInvalid |
The node or an ancestor breaks a rule of the tree. The message says which. The break needn't mean the webhook was off: concurrent writes can jointly break a rule that none broke alone, and the webhook admits the repair — see Change the tree. |
Materialized |
Frozen |
Ready is False, and the node's Kueue objects keep their last good state. |
Materialized |
FlavorMissing |
A budget names a missing ResourceFlavor. Create it. The node's other budgets are written. |
Materialized |
ObjectConflict |
Another owner's Kueue object has the node's name. Delete that object, or recreate the node under another name. |
Materialized |
MaterializationFailed |
Applying a Kueue object failed, for example because a lendingLimit is over its nominal. The message gives the error. |
Clean up¶
Delete the workloads that charge the teams, then the teams:
kubectl delete aq team-alpha team-betaacceleratorquota.ome.io "team-alpha" deleted
acceleratorquota.ome.io "team-beta" deletedThen delete the Cohorts. The webhook denies deleting a node that still has children:
kubectl delete aq ml-research ml-platformacceleratorquota.ome.io "ml-research" deleted
acceleratorquota.ome.io "ml-platform" deletedUninstall the chart:
helm uninstall ome-quota-manager -n omeHelm reports that it kept the Secret ome-quota-manager-webhook-cert, and that the release is uninstalled. With cert-manager issuing the certificate, Helm keeps nothing: there the Secret is cert-manager's, and deleting the Certificate with the release leaves it behind all the same.
Four objects remain: root, the Kueue Cohort root, the webhook Secret and the ResourceFlavor. With the quota manager gone, clear the finalizer on root yourself, then delete all four:
kubectl patch aq root --type=merge -p '{"metadata":{"finalizers":null}}'
kubectl delete aq root
kubectl delete cohorts.kueue.x-k8s.io root
kubectl delete secret -n ome ome-quota-manager-webhook-cert
kubectl delete resourceflavors.kueue.x-k8s.io a100acceleratorquota.ome.io/root patched
acceleratorquota.ome.io "root" deleted
cohort.kueue.x-k8s.io "root" deleted
secret "ome-quota-manager-webhook-cert" deleted
resourceflavor.kueue.x-k8s.io "a100" deletedNext steps¶
- kubectl ome quota:
kubectl ome quota treeprints the tree, andvalidateexits with status 2 when it breaks a rule. - Use the OME scheduler: OME's alpha second scheduler, for Kubernetes 1.35, places each opted-in gang in one topology domain.