From 4f498b0775689fda448bc391bed6d410335e6ad4 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 16 Oct 2024 15:52:13 +0200 Subject: [PATCH] chore(helm): trigger password update only if passwords are rotated Signed-off-by: rjshrjndrn --- scripts/helmcharts/databases/templates/job.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/helmcharts/databases/templates/job.yaml b/scripts/helmcharts/databases/templates/job.yaml index 69880579c..dccefd210 100644 --- a/scripts/helmcharts/databases/templates/job.yaml +++ b/scripts/helmcharts/databases/templates/job.yaml @@ -1,3 +1,4 @@ +{{- if or .Values.postgresql.oldPostgresqlPassword .Values.clickhouse.oldPassword }} --- apiVersion: batch/v1 kind: Job @@ -11,7 +12,7 @@ spec: template: spec: containers: - {{- if .Values.postgres.oldPostgresqlPassword }} + {{- if .Values.postgresql.oldPostgresqlPassword }} - name: update-postgres-password image: postgres:13 env: @@ -53,6 +54,7 @@ spec: fi fi {{- end }} + {{- if .Values.clickhouse.oldPassword }} - name: update-clickhouse-password image: clickhouse/clickhouse-server:22.8 env: @@ -109,5 +111,7 @@ spec: echo "Clickhouse server is not reachable." exit 1 fi + {{- end}} restartPolicy: Never backoffLimit: 3 +{{- end }}