Unverified Commit 65401d75 authored by Julien Mancuso's avatar Julien Mancuso Committed by GitHub
Browse files

fix: allow tolerations and affinity to be set in jobs that run during helm install (#3324)


Signed-off-by: default avatarJulien Mancuso <jmancuso@nvidia.com>
parent 9088e1b5
...@@ -30,6 +30,18 @@ spec: ...@@ -30,6 +30,18 @@ spec:
spec: spec:
restartPolicy: Never restartPolicy: Never
serviceAccountName: {{ include "dynamo-operator.fullname" . }}-ssh-keygen serviceAccountName: {{ include "dynamo-operator.fullname" . }}-ssh-keygen
{{- $sshKeygen := .Values.dynamo.mpiRun.sshKeygen | default dict -}}
{{- $controller := .Values.controllerManager | default dict -}}
{{- $tolerations := ternary $sshKeygen.tolerations $controller.tolerations (hasKey $sshKeygen "tolerations") -}}
{{- if $tolerations }}
tolerations:
{{- toYaml $tolerations | nindent 8 }}
{{- end }}
{{- $affinity := ternary $sshKeygen.affinity $controller.affinity (hasKey $sshKeygen "affinity") -}}
{{- if $affinity }}
affinity:
{{- toYaml $affinity | nindent 8 }}
{{- end }}
securityContext: securityContext:
runAsNonRoot: true runAsNonRoot: true
runAsUser: 65534 runAsUser: 65534
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment