From 092c7264c6c319d0dbac0997b0d4e5c4f27bc7b0 Mon Sep 17 00:00:00 2001 From: Till Skrodzki Date: Sat, 18 Jan 2025 21:16:11 +0100 Subject: [PATCH] Set variable mailu.database.appendix --- mailu/templates/_database.tpl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mailu/templates/_database.tpl b/mailu/templates/_database.tpl index d029779b..78f5232e 100644 --- a/mailu/templates/_database.tpl +++ b/mailu/templates/_database.tpl @@ -71,6 +71,17 @@ {{- end -}} {{- end -}} +{{/* Return the database URI appendix for Mailu */}} +{{- define "mailu.database.appendix" -}} +{{- if .Values.mariadb.enabled -}} + {{- "" | quote }} +{{- else if .Values.postgresql.enabled -}} + {{- "" | quote }} +{{- else }} + {{- .Values.externalDatabase.appendix | quote }} +{{- end -}} +{{- end -}} + {{/* Return the name of the secret for the external database */}} {{- define "mailu.database.external.secretName" -}} {{ include "common.secrets.name" (dict "existingSecret" .Values.externalDatabase.existingSecret "defaultNameSuffix" "externaldb" "context" .) }}