diff --git a/charts/docker-mailserver/Chart.yaml b/charts/docker-mailserver/Chart.yaml index 90a59bd9..bf568454 100644 --- a/charts/docker-mailserver/Chart.yaml +++ b/charts/docker-mailserver/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "13.3.1" description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker. name: docker-mailserver -version: 3.0.12 +version: 3.0.13 sources: - https://github.com/docker-mailserver/docker-mailserver-helm maintainers: diff --git a/charts/docker-mailserver/templates/_helpers.tpl b/charts/docker-mailserver/templates/_helpers.tpl index 90bb52a8..2d3d541f 100644 --- a/charts/docker-mailserver/templates/_helpers.tpl +++ b/charts/docker-mailserver/templates/_helpers.tpl @@ -35,3 +35,22 @@ Create the name of the controller service account to use {{ default "docker-mailserver" .Values.serviceAccount.name }} {{- end -}} {{- end -}} + +{{/* +Renders a value that contains template perhaps with scope if the scope is present. +Usage: +{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }} +{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }} +*/}} +{{- define "common.tplvalues.render" -}} +{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }} +{{- if contains "{{" (toJson .value) }} + {{- if .scope }} + {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }} + {{- else }} + {{- tpl $value .context }} + {{- end }} +{{- else }} + {{- $value }} +{{- end }} +{{- end -}} diff --git a/charts/docker-mailserver/templates/extra-list.yaml b/charts/docker-mailserver/templates/extra-list.yaml new file mode 100644 index 00000000..329f5c65 --- /dev/null +++ b/charts/docker-mailserver/templates/extra-list.yaml @@ -0,0 +1,9 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- range .Values.extraDeploy }} +--- +{{ include "common.tplvalues.render" (dict "value" . "context" $) }} +{{- end }} diff --git a/charts/docker-mailserver/values.yaml b/charts/docker-mailserver/values.yaml index 3a2d8168..b3050668 100644 --- a/charts/docker-mailserver/values.yaml +++ b/charts/docker-mailserver/values.yaml @@ -597,3 +597,7 @@ configMaps: ## ## kubectl create secret rspamd.example.com --namespace mail --from-file=rspamd.dkim.rsa-2048-mail-example.com.private.txt= secrets: {} + +## @param extraDeploy Array of extra objects to deploy with the release +## +extraDeploy: []