Skip to content

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

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

feat: add affinity and nodeSelector to common daemonset config#2645
amarkdotdev wants to merge 1 commit 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.

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>
@amarkdotdev
amarkdotdev force-pushed the feat/daemonset-affinity-nodeselector-2626 branch from 88ba5c4 to f0aa669 Compare July 16, 2026 17:09
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

1 participant