Skip to content

Commit

Permalink
Fix: #966, correct cleanPolicy position
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Pan <[email protected]>
  • Loading branch information
panpan0000 committed Dec 18, 2023
1 parent ce87d10 commit 1c6ae0a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
3 changes: 2 additions & 1 deletion charts/mpijob/templates/mpijob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ metadata:
{{- end }}
spec:
{{- if .Values.cleanPodPolicy }}
cleanPodPolicy: {{ .Values.cleanPodPolicy }}
RunPolicy:
cleanPodPolicy: {{ .Values.cleanPodPolicy }}
{{- end }}
{{- if .Values.launcherOnMaster }}
launcherOnMaster: {{ .Values.launcherOnMaster }}
Expand Down
20 changes: 12 additions & 8 deletions charts/pytorchjob/templates/pytorchjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.cleanPodPolicy }}
cleanPodPolicy: {{ .Values.cleanPodPolicy }}
{{- end }}
{{- if .Values.activeDeadlineSeconds }}
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
{{- end }}
{{- if .Values.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.ttlSecondsAfterFinished }}
{{- if or .Values.cleanPodPolicy .Values.activeDeadlineSeconds .Values.ttlSecondsAfterFinished }}
runPolicy:
{{- if .Values.cleanPodPolicy }}
cleanPodPolicy: {{ .Values.cleanPodPolicy }}
{{- end }}
{{- if .Values.activeDeadlineSeconds }}
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
{{- end }}
{{- if .Values.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.ttlSecondsAfterFinished }}
{{- end }}
{{- end }}

pytorchReplicaSpecs:
Master:
replicas: 1
Expand Down
26 changes: 13 additions & 13 deletions charts/tfjob/templates/tfjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.cleanPodPolicy }}
{{- if eq "None" $cleanPodPolicy }}
cleanPodPolicy: None
{{- end }}
{{- if eq "Running" $cleanPodPolicy }}
cleanPodPolicy: Running
{{- end }}
{{- end }}
{{- if .Values.activeDeadlineSeconds }}
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
{{- if or .Values.cleanPodPolicy .Values.activeDeadlineSeconds .Values.ttlSecondsAfterFinished }}
runPolicy:
{{- if .Values.cleanPodPolicy }}
cleanPodPolicy: {{ .Values.cleanPodPolicy }}
{{- end }}
{{- if .Values.activeDeadlineSeconds }}
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
{{- end }}
{{- if .Values.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.ttlSecondsAfterFinished }}
{{- end }}
{{- end }}

{{- if .Values.startingDeadlineSeconds }}
startingDeadlineSeconds: {{ .Values.startingDeadlineSeconds }}
{{- end }}
{{- if .Values.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.ttlSecondsAfterFinished }}
{{- end }}

tfReplicaSpecs:
{{- if .Values.ps }}
PS:
Expand Down

0 comments on commit 1c6ae0a

Please sign in to comment.