From 98b0e58e9171878bf57e792f966a5a4a4b1cb6a6 Mon Sep 17 00:00:00 2001 From: Duyet Le <5009534+duyet@users.noreply.github.com> Date: Sun, 30 Jun 2024 14:39:56 +0700 Subject: [PATCH] fix(clickhouse-monitoring): add restart policy (#181) * feat(clickhouse-monitoring): add cronjob * fix(clickhouse-monitoring): fix type, add docs * fix(clickhouse-monitoring): cronjob api version for older k8s version * fix(clickhouse-monitoring): fix release * fix(clickhouse-monitoring): fix release * fix(clickhouse-monitoring): add restart policy --- clickhouse-monitoring/templates/cronjob.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clickhouse-monitoring/templates/cronjob.yaml b/clickhouse-monitoring/templates/cronjob.yaml index a9105e6..88a56ce 100644 --- a/clickhouse-monitoring/templates/cronjob.yaml +++ b/clickhouse-monitoring/templates/cronjob.yaml @@ -1,6 +1,5 @@ {{- if $.Values.cronjob.enabled }} {{- range $endpoint := $.Values.cronjob.endpoints }} - --- apiVersion: {{ include "clickhouse-monitoring.cronJobApiVersion" $ }} kind: CronJob @@ -30,13 +29,12 @@ spec: imagePullSecrets: {{- toYaml . | nindent 12 }} {{- end }} + restartPolicy: {{ $.Values.cronjob.restartPolicy | default "OnFailure" }} securityContext: {{- toYaml $.Values.podSecurityContext | nindent 12 }} restartPolicy: {{- $.Values.cronjob.restartPolicy | default "OnFailure" }} containers: - name: {{ $.Chart.Name }} - securityContext: - {{- toYaml $.Values.securityContext | nindent 16 }} {{- with $.Values.cronjob.image }} image: "{{ .repository }}:{{ .tag }}" imagePullPolicy: {{ .pullPolicy | default $.Values.image.pullPolicy }}