Skip to content

Commit 9bdcc8b

Browse files
committed
tidy up validation and helper
1 parent 24d273d commit 9bdcc8b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hosting/k8s/helm/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ postgresql://{{ .Values.postgres.auth.username }}:{{ .Values.postgres.auth.passw
121121
Check if we should use DATABASE_URL from secret
122122
*/}}
123123
{{- define "trigger-v4.postgres.useSecretUrl" -}}
124-
{{- or (and .Values.postgres.external.databaseUrl .Values.postgres.external.existingSecret) (and .Values.postgres.external.existingSecret) -}}
124+
{{- and .Values.postgres.external.existingSecret -}}
125125
{{- end }}
126126

127127
{{/*

hosting/k8s/helm/templates/validate-external-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ This template will fail the Helm deployment if external config is missing for re
2828
{{- if not .Values.s3.external.endpoint }}
2929
{{- fail "S3 external configuration is required when s3.deploy=false. Please provide s3.external.endpoint" }}
3030
{{- end }}
31-
{{- if and (not .Values.s3.external.existingSecret) (not .Values.s3.external.accessKeyId) }}
32-
{{- fail "S3 credentials are required when s3.deploy=false. Please provide either s3.external.accessKeyId or s3.external.existingSecret" }}
31+
{{- if and (not .Values.s3.external.existingSecret) (or (not .Values.s3.external.accessKeyId) (not .Values.s3.external.secretAccessKey)) }}
32+
{{- fail "S3 credentials are required when s3.deploy=false. Please provide either s3.external.existingSecret or both s3.external.accessKeyId and s3.external.secretAccessKey" }}
3333
{{- end }}
3434
{{- end }}
3535

0 commit comments

Comments
 (0)