mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-10-03 03:44:47 +08:00
Update: Add the possibility to add a Secret to the chart
This commit is contained in:
parent
c6e9a2e4a9
commit
4677036a14
4 changed files with 34 additions and 0 deletions
15
helm/mail/templates/secret.yaml
Normal file
15
helm/mail/templates/secret.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{- $chart := "mail" -}}
|
||||
{{- $fullName := include (print $chart ".fullname") . -}}
|
||||
{{- $labels := include (print $chart ".labels") . -}}
|
||||
{{- with .Values.secret }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- $labels | nindent 4 }}
|
||||
data:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{ end }}
|
|
@ -91,6 +91,10 @@ spec:
|
|||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ $fullName | quote }}
|
||||
{{- with .Values.secret }}
|
||||
- secretRef:
|
||||
name: {{ $fullName | quote }}
|
||||
{{- end }}
|
||||
{{ with .Values.extraEnv }}env: {{- toYaml . | nindent 12 }}{{ end }}
|
||||
volumeMounts:
|
||||
- mountPath: /var/spool/postfix
|
||||
|
|
|
@ -68,6 +68,10 @@ container:
|
|||
postfix:
|
||||
securityContext: {}
|
||||
|
||||
# Define data which should be stored in a Secret
|
||||
# (and shared with the pod as environment variables)
|
||||
# secret: {}
|
||||
|
||||
config:
|
||||
general: {}
|
||||
# e.g.
|
||||
|
|
11
helm/test_5_secret.yml
Normal file
11
helm/test_5_secret.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
autoscaling:
|
||||
enabled: true
|
||||
maxReplicas: 4
|
||||
|
||||
config:
|
||||
general:
|
||||
TZ: Europe/London
|
||||
ALLOWED_SENDER_DOMAINS: example.org
|
||||
|
||||
secret:
|
||||
Hello: "World"
|
Loading…
Add table
Reference in a new issue