diff --git a/deploy/helm/pargar/templates/secret-data.yaml b/deploy/helm/pargar/templates/secret-data.yaml index 9a61258..2aaedd7 100644 --- a/deploy/helm/pargar/templates/secret-data.yaml +++ b/deploy/helm/pargar/templates/secret-data.yaml @@ -8,7 +8,10 @@ {{- else if and .Values.postgres.auth.password (not (hasPrefix "change-me" .Values.postgres.auth.password)) (ne .Values.postgres.auth.password "") }} {{- $pgPass = .Values.postgres.auth.password }} {{- else }} - {{- $pgPass = randAlphaNum 32 }} + {{- /* Fail loudly instead of silently minting a random password: under + Argo CD (helm template) `lookup` is always empty, and a random + value would diverge from the live service on every render. */}} + {{- fail "postgres.auth.password must be set: no existing pargar-postgres secret was found and .Values.postgres.auth.password is empty or a change-me placeholder" }} {{- end }} apiVersion: v1 kind: Secret @@ -30,7 +33,7 @@ stringData: {{- else if and .Values.redis.auth.password (not (hasPrefix "change-me" .Values.redis.auth.password)) (ne .Values.redis.auth.password "") }} {{- $rdPass = .Values.redis.auth.password }} {{- else }} - {{- $rdPass = randAlphaNum 32 }} + {{- fail "redis.auth.password must be set: no existing pargar-redis secret was found and .Values.redis.auth.password is empty or a change-me placeholder" }} {{- end }} apiVersion: v1 kind: Secret @@ -56,7 +59,7 @@ stringData: {{- else if and .Values.rustfs.auth.secretKey (not (hasPrefix "change-me" .Values.rustfs.auth.secretKey)) (ne .Values.rustfs.auth.secretKey "") }} {{- $secret = .Values.rustfs.auth.secretKey }} {{- else }} - {{- $secret = randAlphaNum 40 }} + {{- fail "rustfs.auth.secretKey must be set: no existing pargar-rustfs secret was found and .Values.rustfs.auth.secretKey is empty or a change-me placeholder" }} {{- end }} apiVersion: v1 kind: Secret