From 8c431054e7a9707b12ff2d6413904bf823140a5c Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Tue, 28 Jul 2026 10:43:36 -0700 Subject: [PATCH] helm: schedule CRD hook Jobs on Linux nodes Add the operator nodeSelector to the upgrade-crd and cleanup-crd hook Jobs. When it is unset, default to kubernetes.io/os: linux so these Linux-only Jobs cannot be scheduled onto untainted Windows nodes in mixed-OS clusters. Add the default nodeSelector value to values.yaml. Fixes: https://github.com/NVIDIA/gpu-operator/issues/2608 Co-requested-by: Tariq Ibrahim Signed-off-by: Billard <82095453+iacker@users.noreply.github.com> Signed-off-by: Rahul Sharma --- deployments/gpu-operator/templates/cleanup_crd.yaml | 2 ++ deployments/gpu-operator/templates/cleanup_gpucluster.yaml | 2 ++ deployments/gpu-operator/templates/upgrade_crd.yaml | 2 ++ deployments/gpu-operator/values.yaml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/deployments/gpu-operator/templates/cleanup_crd.yaml b/deployments/gpu-operator/templates/cleanup_crd.yaml index 4ed45b20f4..07dac810c6 100644 --- a/deployments/gpu-operator/templates/cleanup_crd.yaml +++ b/deployments/gpu-operator/templates/cleanup_crd.yaml @@ -30,6 +30,8 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + nodeSelector: + {{- toYaml .Values.operator.nodeSelector | nindent 8 }} containers: - name: cleanup-crd image: {{ include "gpu-operator.fullimage" . }} diff --git a/deployments/gpu-operator/templates/cleanup_gpucluster.yaml b/deployments/gpu-operator/templates/cleanup_gpucluster.yaml index 2c1725359c..f5d0d83744 100644 --- a/deployments/gpu-operator/templates/cleanup_gpucluster.yaml +++ b/deployments/gpu-operator/templates/cleanup_gpucluster.yaml @@ -35,6 +35,8 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + nodeSelector: + {{- toYaml .Values.operator.nodeSelector | nindent 8 }} containers: - name: cleanup-gpucluster image: {{ include "gpu-operator.fullimage" . }} diff --git a/deployments/gpu-operator/templates/upgrade_crd.yaml b/deployments/gpu-operator/templates/upgrade_crd.yaml index a66794d368..bbf718f999 100644 --- a/deployments/gpu-operator/templates/upgrade_crd.yaml +++ b/deployments/gpu-operator/templates/upgrade_crd.yaml @@ -79,6 +79,8 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + nodeSelector: + {{- toYaml .Values.operator.nodeSelector | nindent 8 }} containers: - name: upgrade-crd image: {{ include "gpu-operator.fullimage" . }} diff --git a/deployments/gpu-operator/values.yaml b/deployments/gpu-operator/values.yaml index a126dafc53..a197ee757b 100644 --- a/deployments/gpu-operator/values.yaml +++ b/deployments/gpu-operator/values.yaml @@ -82,6 +82,8 @@ operator: env: [] priorityClassName: system-node-critical runtimeClass: nvidia + nodeSelector: + kubernetes.io/os: linux use_ocp_driver_toolkit: false # cleanup CRD on chart un-install cleanupCRD: false