Skip to content

feat: add affinity and nodeSelector to common daemonset config - #2645

Open
amarkdotdev wants to merge 2 commits into
NVIDIA:mainfrom
amarkdotdev:feat/daemonset-affinity-nodeselector-2626
Open

feat: add affinity and nodeSelector to common daemonset config#2645
amarkdotdev wants to merge 2 commits into
NVIDIA:mainfrom
amarkdotdev:feat/daemonset-affinity-nodeselector-2626

Conversation

@amarkdotdev

@amarkdotdev amarkdotdev commented Jul 16, 2026

Copy link
Copy Markdown

Fixes #2626

ClusterPolicy already exposes common tolerations for operand daemonsets but there was no matching knob for affinity or nodeSelector. This adds both under spec.daemonsets and surfaces them in Helm as daemonsets.affinity and daemonsets.nodeSelector.

User nodeSelector labels are merged into the operand nodeSelector, so the existing nvidia.com/gpu.deploy.* labels stay put.

The affinity CRD field is schemaless so we accept a normal Kubernetes affinity object without inlining the full OpenAPI schema into the ClusterPolicy CRD.

Testing

  • go test ./controllers/... -run TestApplyCommonDaemonSetConfig

@copy-pr-bot

copy-pr-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@amarkdotdev
amarkdotdev force-pushed the feat/daemonset-affinity-nodeselector-2626 branch 3 times, most recently from f0aa669 to 530835d Compare July 21, 2026 19:23
@amarkdotdev
amarkdotdev force-pushed the feat/daemonset-affinity-nodeselector-2626 branch from 530835d to be752b6 Compare July 27, 2026 20:29
@amarkdotdev

Copy link
Copy Markdown
Author

Hey, this is waiting on CI workflow approval / first-time contributor vetting. Could a maintainer kick that off when convenient? Thanks!

@rajathagasthya

Copy link
Copy Markdown
Contributor

/ok-to-test be752b6

Expose spec.daemonsets.affinity and spec.daemonsets.nodeSelector on
ClusterPolicy and wire them through Helm. User nodeSelector labels are
merged with existing operand nodeSelector entries.

Use a schemaless CRD field for affinity so we do not embed the full
corev1.Affinity OpenAPI schema in the ClusterPolicy CRD.

Signed-off-by: amarkdotdev <amarkdotdev@users.noreply.github.com>
Regenerate published GPUCluster CRDs for the common daemonset affinity
and nodeSelector API fields.

Signed-off-by: amarkdotdev <amarkdotdev@users.noreply.github.com>
@amarkdotdev
amarkdotdev force-pushed the feat/daemonset-affinity-nodeselector-2626 branch from be752b6 to 9efb8b7 Compare July 28, 2026 18:25
@amarkdotdev

Copy link
Copy Markdown
Author

@rajathagasthya Fixed the generated GPUCluster CRDs and rebased the branch onto upstream/main. make check’s generated-assets validation is now clean.

@rajathagasthya

Copy link
Copy Markdown
Contributor

Thanks @amarkdotdev! We are in a bit of a code freeze right now for an upcoming release, so we're only taking release-critical PRs. You can expect this PR to get attention once the release is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support affinity / nodeSelector for operand DaemonSets in ClusterPolicy spec.daemonsets

2 participants