Skip to content

Commit 19ee69c

Browse files
iackerrahulait
authored andcommitted
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: #2608 Co-requested-by: Tariq Ibrahim <tariq1890> Signed-off-by: Billard <82095453+iacker@users.noreply.github.com> Signed-off-by: Rahul Sharma <rahulsharm@nvidia.com>
1 parent f3f9415 commit 19ee69c

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎deployments/gpu-operator/templates/cleanup_crd.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ spec:
3030
tolerations:
3131
{{- toYaml . | nindent 8 }}
3232
{{- end }}
33+
nodeSelector:
34+
{{- toYaml .Values.operator.nodeSelector | nindent 8 }}
3335
containers:
3436
- name: cleanup-crd
3537
image: {{ include "gpu-operator.fullimage" . }}

‎deployments/gpu-operator/templates/upgrade_crd.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ spec:
7979
tolerations:
8080
{{- toYaml . | nindent 8 }}
8181
{{- end }}
82+
nodeSelector:
83+
{{- toYaml .Values.operator.nodeSelector | nindent 8 }}
8284
containers:
8385
- name: upgrade-crd
8486
image: {{ include "gpu-operator.fullimage" . }}

‎deployments/gpu-operator/values.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ operator:
8282
env: []
8383
priorityClassName: system-node-critical
8484
runtimeClass: nvidia
85+
nodeSelector:
86+
kubernetes.io/os: linux
8587
use_ocp_driver_toolkit: false
8688
# cleanup CRD on chart un-install
8789
cleanupCRD: false

0 commit comments

Comments
 (0)