From 2731eaaaf7496a930e82a4f1e436156ee0478ec0 Mon Sep 17 00:00:00 2001 From: Annavar Satish <112172196+Annavar-satish@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:36:29 +0530 Subject: [PATCH] fix the cronjob to take 0 as historylimit (#47) * fix the cronjob to take 0 as historylimit * update chart version --- charts/polymorphic-app/Chart.yaml | 2 +- charts/polymorphic-app/templates/cronjob.yaml | 8 ++------ charts/polymorphic-app/values.yaml | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/charts/polymorphic-app/Chart.yaml b/charts/polymorphic-app/Chart.yaml index 6886f10..4cacefa 100644 --- a/charts/polymorphic-app/Chart.yaml +++ b/charts/polymorphic-app/Chart.yaml @@ -4,5 +4,5 @@ description: A Helm chart for deploying any custom applications, specifically po maintainers: - name: improwised type: application -version: 1.2.6 +version: 1.2.7 appVersion: 1.0.0 diff --git a/charts/polymorphic-app/templates/cronjob.yaml b/charts/polymorphic-app/templates/cronjob.yaml index 25f12a1..4e0f425 100644 --- a/charts/polymorphic-app/templates/cronjob.yaml +++ b/charts/polymorphic-app/templates/cronjob.yaml @@ -13,12 +13,8 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: -{{- with .successfulJobsHistoryLimit | default $.Values.cronJobTemplate.successfulJobsHistoryLimit }} - successfulJobsHistoryLimit: {{ toYaml . }} -{{- end }} -{{- with .failedJobsHistoryLimit | default $.Values.cronJobTemplate.failedJobsHistoryLimit }} - failedJobsHistoryLimit: {{ toYaml . }} -{{- end }} + successfulJobsHistoryLimit: {{ .successfulJobsHistoryLimit | default $.Values.cronJobTemplate.successfulJobsHistoryLimit | default 0 }} + failedJobsHistoryLimit: {{ .failedJobsHistoryLimit | default $.Values.cronJobTemplate.failedJobsHistoryLimit | default 0 }} schedule: {{ .schedule | quote }} suspend: {{ .suspend | default false }} jobTemplate: diff --git a/charts/polymorphic-app/values.yaml b/charts/polymorphic-app/values.yaml index fb1ff67..c58866b 100644 --- a/charts/polymorphic-app/values.yaml +++ b/charts/polymorphic-app/values.yaml @@ -232,8 +232,8 @@ cronJobTemplate: # fsGroup: 1001 # runAsGroup: 1001 # runAsUser: 1001 - successfulJobsHistoryLimit: 1 - failedJobsHistoryLimit: 1 + # successfulJobsHistoryLimit: 1 + # failedJobsHistoryLimit: 1 cronJobs: # - name: update-status