diff --git a/charts/mpijob/templates/mpijob.yaml b/charts/mpijob/templates/mpijob.yaml index 8b43d04a6..d9d0ef816 100644 --- a/charts/mpijob/templates/mpijob.yaml +++ b/charts/mpijob/templates/mpijob.yaml @@ -21,7 +21,8 @@ metadata: {{- end }} spec: {{- if .Values.cleanPodPolicy }} - cleanPodPolicy: {{ .Values.cleanPodPolicy }} + RunPolicy: + cleanPodPolicy: {{ .Values.cleanPodPolicy }} {{- end }} {{- if .Values.launcherOnMaster }} launcherOnMaster: {{ .Values.launcherOnMaster }} diff --git a/charts/pytorchjob/templates/pytorchjob.yaml b/charts/pytorchjob/templates/pytorchjob.yaml index c9bc361a4..b4208f769 100644 --- a/charts/pytorchjob/templates/pytorchjob.yaml +++ b/charts/pytorchjob/templates/pytorchjob.yaml @@ -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 diff --git a/charts/tfjob/templates/tfjob.yaml b/charts/tfjob/templates/tfjob.yaml index 8dc4b875d..d054241f5 100644 --- a/charts/tfjob/templates/tfjob.yaml +++ b/charts/tfjob/templates/tfjob.yaml @@ -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: