Skip to content

Commit 2de2f7b

Browse files
committed
configure gpu taint tolerations explicitly
1 parent 705be76 commit 2de2f7b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

applications/web/templates/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,13 @@ spec:
462462
value: {{ $nodeGroup.id | quote }}
463463
effect: "NoSchedule"
464464
{{- end }}
465+
# nvidia.com/gpu tolerations is automatically injected in EKS/GKE, but not in AKS
466+
# since we want to be cloud agnostic, we just add it ourselves wherever we need it
467+
{{- if .Values.resources.requests.nvidiaGpu}}
468+
- key: "nvidia.com/gpu"
469+
operator: "Exists"
470+
effect: "NoSchedule"
471+
{{- end }}
465472
{{- if .Values.topology.enabled }}
466473
topologySpreadConstraints:
467474
- maxSkew: {{ .Values.topology.maxSkew }}

applications/worker/templates/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,13 @@ spec:
375375
value: {{ $nodeGroup.id | quote }}
376376
effect: "NoSchedule"
377377
{{- end }}
378+
# nvidia.com/gpu tolerations is automatically injected in EKS/GKE, but not in AKS
379+
# since we want to be cloud agnostic, we just add it ourselves wherever we need it
380+
{{- if .Values.resources.requests.nvidiaGpu}}
381+
- key: "nvidia.com/gpu"
382+
operator: "Exists"
383+
effect: "NoSchedule"
384+
{{- end }}
378385
{{- if .Values.topology.enabled }}
379386
topologySpreadConstraints:
380387
- maxSkew: {{ .Values.topology.maxSkew }}

0 commit comments

Comments
 (0)