From a0327fd1b8ab0a0a585f19972cc2c7a5a7d7f696 Mon Sep 17 00:00:00 2001 From: Rhea Danzey Date: Mon, 27 Mar 2023 15:53:13 -0500 Subject: [PATCH] Allow templating to succeed if postgres deployment is enabled but a connection string is defined Signed-off-by: Rhea Danzey --- helm/dendrite/templates/_helpers.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/dendrite/templates/_helpers.tpl b/helm/dendrite/templates/_helpers.tpl index 026706588..72bc773f5 100644 --- a/helm/dendrite/templates/_helpers.tpl +++ b/helm/dendrite/templates/_helpers.tpl @@ -2,13 +2,13 @@ {{- if not .Values.signing_key.create -}} {{- fail "You must create a signing key for configuration.signing_key. (see https://github.com/matrix-org/dendrite/blob/master/docs/INSTALL.md#server-key-generation)" -}} {{- end -}} -{{- if not (or .Values.dendrite_config.global.database.host .Values.postgresql.enabled) -}} +{{- if and (eq .Values.dendrite_config.global.database.connection_string "") (not (or .Values.dendrite_config.global.database.host .Values.postgresql.enabled)) -}} {{- fail "Database server must be set." -}} {{- end -}} -{{- if not (or .Values.dendrite_config.global.database.user .Values.postgresql.enabled) -}} +{{- if and (eq .Values.dendrite_config.global.database.connection_string "") (not (or .Values.dendrite_config.global.database.user .Values.postgresql.enabled)) -}} {{- fail "Database user must be set." -}} {{- end -}} -{{- if not (or .Values.dendrite_config.global.database.password .Values.postgresql.enabled) -}} +{{- if and (eq .Values.dendrite_config.global.database.connection_string "") (not .Values.dendrite_config.global.database.password) (not .Values.postgresql.enabled) -}} {{- fail "Database password must be set." -}} {{- end -}} {{- end -}}