Skip to content

Commit 728f55f

Browse files
committed
bugfix: proper handling of values set to 0
`if .Values.X` evaluates to false if X is defined to be 0. This resulted in retryLimit and terminationGracePeriodSeconds not being properly propagated through the the generated yaml if the user sets their value to 0 (as opposed to nil).
1 parent aa6a58a commit 728f55f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/pytorchjob-generator/chart/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ annotations:
2929

3030

3131
{{- define "mlbatch.schedulingSpec" }}
32-
{{- if .Values.terminationGracePeriodSeconds }}
32+
{{- if ne .Values.terminationGracePeriodSeconds nil }}
3333
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
3434
{{- end }}
3535
{{- if .Values.bypassCoscheduler }}

tools/pytorchjob-generator/chart/templates/appwrapper.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ metadata:
6767
{{- if .Values.retryPausePeriodDuration }}
6868
workload.codeflare.dev.appwrapper/retryPausePeriodDuration: "{{ .Values.retryPausePeriodDuration }}"
6969
{{- end }}
70-
{{- if .Values.retryLimit }}
70+
{{- if ne .Values.retryLimit nil }}
7171
workload.codeflare.dev.appwrapper/retryLimit: "{{ .Values.retryLimit }}"
7272
{{- end }}
7373
{{- if .Values.forcefulDeletionGracePeriodDuration }}

0 commit comments

Comments
 (0)