Skip to content

Commit f60c546

Browse files
author
gulecroc
committed
add extraDeploy
1 parent 6e9c4d3 commit f60c546

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

charts/docker-mailserver/templates/_helpers.tpl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,22 @@ Create the name of the controller service account to use
3535
{{ default "docker-mailserver" .Values.serviceAccount.name }}
3636
{{- end -}}
3737
{{- end -}}
38+
39+
{{/*
40+
Renders a value that contains template perhaps with scope if the scope is present.
41+
Usage:
42+
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }}
43+
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }}
44+
*/}}
45+
{{- define "common.tplvalues.render" -}}
46+
{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
47+
{{- if contains "{{" (toJson .value) }}
48+
{{- if .scope }}
49+
{{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }}
50+
{{- else }}
51+
{{- tpl $value .context }}
52+
{{- end }}
53+
{{- else }}
54+
{{- $value }}
55+
{{- end }}
56+
{{- end -}}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{- /*
2+
Copyright Broadcom, Inc. All Rights Reserved.
3+
SPDX-License-Identifier: APACHE-2.0
4+
*/}}
5+
6+
{{- range .Values.extraDeploy }}
7+
---
8+
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
9+
{{- end }}

charts/docker-mailserver/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,3 +591,7 @@ configMaps:
591591
##
592592
## kubectl create secret rspamd.example.com --namespace mail --from-file=rspamd.dkim.rsa-2048-mail-example.com.private.txt=<path_to_rspamd.dkim.rsa-2048-mail-example.com.private.txt>
593593
secrets: {}
594+
595+
## @param extraDeploy Array of extra objects to deploy with the release
596+
##
597+
extraDeploy: []

0 commit comments

Comments
 (0)