From f60c546454843eaacc9bc9dd34dd4ffaae9e31ce Mon Sep 17 00:00:00 2001 From: gulecroc Date: Wed, 15 May 2024 11:11:06 +0200 Subject: [PATCH 1/3] add extraDeploy --- .../docker-mailserver/templates/_helpers.tpl | 19 +++++++++++++++++++ .../templates/extra-list.yaml | 9 +++++++++ charts/docker-mailserver/values.yaml | 4 ++++ 3 files changed, 32 insertions(+) create mode 100644 charts/docker-mailserver/templates/extra-list.yaml 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..2dcd26f3 --- /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 }} \ No newline at end of file diff --git a/charts/docker-mailserver/values.yaml b/charts/docker-mailserver/values.yaml index 08eb5978..79437f9d 100644 --- a/charts/docker-mailserver/values.yaml +++ b/charts/docker-mailserver/values.yaml @@ -591,3 +591,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: [] From 54e9fd0afe0022a3299e7134890e30eb559acb5e Mon Sep 17 00:00:00 2001 From: gulecroc Date: Wed, 15 May 2024 11:12:52 +0200 Subject: [PATCH 2/3] add new line --- charts/docker-mailserver/templates/extra-list.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/docker-mailserver/templates/extra-list.yaml b/charts/docker-mailserver/templates/extra-list.yaml index 2dcd26f3..329f5c65 100644 --- a/charts/docker-mailserver/templates/extra-list.yaml +++ b/charts/docker-mailserver/templates/extra-list.yaml @@ -6,4 +6,4 @@ SPDX-License-Identifier: APACHE-2.0 {{- range .Values.extraDeploy }} --- {{ include "common.tplvalues.render" (dict "value" . "context" $) }} -{{- end }} \ No newline at end of file +{{- end }} From 1fc725f39b9aa4d1c16d781da9839e1d5bc6b5eb Mon Sep 17 00:00:00 2001 From: gulecroc Date: Mon, 20 May 2024 10:59:50 +0200 Subject: [PATCH 3/3] bump chart version to v3.0.13 --- charts/docker-mailserver/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: