From 04e2955c0ea151f8eec47db488371f47b0436d5a Mon Sep 17 00:00:00 2001 From: Rhea Danzey Date: Mon, 27 Mar 2023 15:06:23 -0500 Subject: [PATCH] Don't fail config validation if existingSecret is provided but .Vaues.signing_key.create is false (use existing key) Signed-off-by: Rhea Danzey --- helm/dendrite/templates/_helpers.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/dendrite/templates/_helpers.tpl b/helm/dendrite/templates/_helpers.tpl index 026706588..ac163f323 100644 --- a/helm/dendrite/templates/_helpers.tpl +++ b/helm/dendrite/templates/_helpers.tpl @@ -1,6 +1,6 @@ {{- define "validate.config" }} -{{- 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)" -}} +{{- if and (not .Values.signing_key.create) (eq .Values.signing_key.existingSecret "") -}} +{{- fail "You must create a signing key for configuration.signing_key OR specify an existing secret name in .Values.signing_key.existingSecret to mount it. (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) -}} {{- fail "Database server must be set." -}}