Skip to content

fix(kubernetes-nodes): announce role labels and GPUs for scale from zero - #4949

Draft
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
feat/kubernetes-nodes-labels-taintsfrom
fix/kubernetes-nodes-scale-from-zero
Draft

Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
feat/kubernetes-nodes-labels-taintsfrom
fix/kubernetes-nodes-scale-from-zero

Conversation

@lexfrei

Copy link
Copy Markdown
Contributor

What this PR does

A tenant worker pool scaled to zero didn't scale up for pods that need one of its roles, its GPU label or its GPUs. Such pods stayed Pending. Examples: the tenant ingress-nginx on a role pool, a pod with nodeSelector: {gpu: "on"}, a pod requesting nvidia.com/gpu. With no Node in the pool, cluster-autoscaler builds the template node from the MachineDeployment's capacity annotations only, and those had no role labels, no gpu=on and no GPUs. Now they have all three. GPUs are announced as nvidia.com/gpu with the number of attached GPUs. The commit message explains that name and the HAMi undercount.

Stacked on #4927, the base branch is feat/kubernetes-nodes-labels-taints.

One thing is left out on purpose and needs your call. GPU nodes don't get the cluster-api/accelerator label. The autoscaler uses it to treat a new node as unready until its GPUs show up, so without it the autoscaler may add extra nodes while the device plugin starts. Adding the label would roll every existing GPU pool.

No machine rolls with this change, only MachineDeployment annotations move. A pool without roles or GPUs renders byte for byte as before, and its golden snapshots didn't change. I checked the format against the cluster-autoscaler 1.32.0 source and covered it with helm unit tests. Not tested on a cluster yet.

Screenshots

No UI changes.

Downstream repositories

The diff touches only templates/nodegroup.yaml and the chart's tests: no values, schema, README or API change.

Release note

fix(kubernetes): a tenant worker pool scaled to zero now scales up for pods that select its role or GPU label or request GPUs.

@github-actions github-actions Bot added size/M This PR changes 30-99 lines, ignoring generated files area/kubernetes Issues or PRs related to the tenant Kubernetes app kind/bug Categorizes issue or PR as related to a bug labels Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

A pool scaled to zero has no Node, so the cluster-autoscaler builds its
template node from the MachineDeployment's capacity annotations alone.
The labels annotation carried only the pool's own labels, and nothing
announced GPUs. A pod selecting a role, such as the tenant
ingress-nginx, or selecting gpu=on, never scaled its pool up from
zero, and neither did a pod requesting a GPU.

The labels annotation now also carries the role labels and, on a GPU
pool, gpu=on. A GPU pool announces its GPUs as nvidia.com/gpu with the
number of attached GPUs: inside the tenant the device plugin serves
every attached GPU under that name, whatever host device the pool
names. HAMi splits each GPU into several, so with HAMi enabled a pool
scaled to zero is planned for fewer GPUs than it serves.

GPU nodes still do not carry the cluster-api/accelerator label the
autoscaler needs to hold a new node as unready until its GPUs show up,
so a scale-up may request extra nodes while the device plugin starts.
Setting it goes through the bootstrap config and would roll every GPU
pool.

These are MachineDeployment annotations, so no machine rolls. A pool
without roles or GPUs renders as before.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
@lexfrei
Aleksei Sviridkin (lexfrei) force-pushed the feat/kubernetes-nodes-labels-taints branch from 66c6a82 to f317a98 Compare October 29, 2026 15:56
@lexfrei
Aleksei Sviridkin (lexfrei) force-pushed the fix/kubernetes-nodes-scale-from-zero branch from fca7b60 to 5955b33 Compare October 29, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/kubernetes Issues or PRs related to the tenant Kubernetes app kind/bug Categorizes issue or PR as related to a bug size/M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant