Skip to content

Commit

Permalink
Merge pull request docker-mailserver#116 from gulecroc/extra-deploy
Browse files Browse the repository at this point in the history
Add extra deploy
  • Loading branch information
cfis authored May 20, 2024
2 parents 07bf88b + 1fc725f commit b555b78
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/docker-mailserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 19 additions & 0 deletions charts/docker-mailserver/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
9 changes: 9 additions & 0 deletions charts/docker-mailserver/templates/extra-list.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 4 additions & 0 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -597,3 +597,7 @@ configMaps:
##
## 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>
secrets: {}

## @param extraDeploy Array of extra objects to deploy with the release
##
extraDeploy: []

0 comments on commit b555b78

Please sign in to comment.