Skip to content

Commit

Permalink
Set variable mailu.database.appendix
Browse files Browse the repository at this point in the history
  • Loading branch information
Grennith committed Jan 18, 2025
1 parent 557e6ac commit 092c726
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mailu/templates/_database.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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" .) }}
Expand Down

0 comments on commit 092c726

Please sign in to comment.