Compare commits

...

1 commit

Author SHA1 Message Date
Rhea Danzey a0327fd1b8 Allow templating to succeed if postgres deployment is enabled but a connection string is defined
Signed-off-by: Rhea Danzey <rdanzey@element.io>
2023-03-27 15:53:13 -05:00

View file

@ -2,13 +2,13 @@
{{- if not .Values.signing_key.create -}} {{- 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)" -}} {{- 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 -}} {{- 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." -}} {{- fail "Database server must be set." -}}
{{- end -}} {{- 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." -}} {{- fail "Database user must be set." -}}
{{- end -}} {{- 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." -}} {{- fail "Database password must be set." -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}