From bc6323611b3968951aac06a7341bda966d23f79d Mon Sep 17 00:00:00 2001 From: changjun Date: Wed, 11 Dec 2024 13:46:40 +0800 Subject: [PATCH] Fixed the issue when successfulJobsHistoryLimit and failedJobsHistoryLimit variables are 0. --- charts/descheduler/templates/cronjob.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/descheduler/templates/cronjob.yaml b/charts/descheduler/templates/cronjob.yaml index 0970473451..90d535fe42 100644 --- a/charts/descheduler/templates/cronjob.yaml +++ b/charts/descheduler/templates/cronjob.yaml @@ -15,10 +15,10 @@ spec: {{- if .Values.startingDeadlineSeconds }} startingDeadlineSeconds: {{ .Values.startingDeadlineSeconds }} {{- end }} - {{- if .Values.successfulJobsHistoryLimit }} + {{- if ne .Values.successfulJobsHistoryLimit nil }} successfulJobsHistoryLimit: {{ .Values.successfulJobsHistoryLimit }} {{- end }} - {{- if .Values.failedJobsHistoryLimit }} + {{- if ne .Values.failedJobsHistoryLimit nil }} failedJobsHistoryLimit: {{ .Values.failedJobsHistoryLimit }} {{- end }} {{- if .Values.timeZone }}