Skip to content

Commit

Permalink
Fix: unable to set cleanPodPolicy to All when submitting TFJob (#1191)
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Chen <[email protected]>
  • Loading branch information
ChenYi015 authored Nov 7, 2024
1 parent 76ca059 commit 46a795e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions charts/tfjob/templates/tfjob.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{{- $gpuCount := .Values.gpuCount -}}
{{- $psGpuCount := .Values.psGPU -}}
{{- $syncMode := .Values.syncMode -}}
{{- $cleanPodPolicy := .Values.cleanPodPolicy -}}
{{- $dataDirs := .Values.dataDirs -}}
{{- $tfNodeSelectors :=.Values.tfNodeSelectors -}}
apiVersion: "kubeflow.org/v1"
Expand All @@ -24,8 +23,8 @@ metadata:
spec:
{{- if .Values.trainingOperatorCRD }}
runPolicy:
{{- if .Values.cleanPodPolicy }}
cleanPodPolicy: {{ .Values.cleanPodPolicy }}
{{- with .Values.cleanPodPolicy }}
cleanPodPolicy: {{ . }}
{{- end }}
{{- if .Values.activeDeadlineSeconds }}
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
Expand All @@ -34,13 +33,8 @@ spec:
ttlSecondsAfterFinished: {{ .Values.ttlSecondsAfterFinished }}
{{- end }}
{{- else }}
{{- if .Values.cleanPodPolicy }}
{{- if eq "None" $cleanPodPolicy }}
cleanPodPolicy: None
{{- end }}
{{- if eq "Running" $cleanPodPolicy }}
cleanPodPolicy: Running
{{- end }}
{{- with .Values.cleanPodPolicy }}
cleanPodPolicy: {{ . }}
{{- end }}
{{- if .Values.activeDeadlineSeconds }}
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
Expand Down

0 comments on commit 46a795e

Please sign in to comment.