diff --git a/helm/mail/templates/statefulset.yaml b/helm/mail/templates/statefulset.yaml index 14ed96d..a341d88 100644 --- a/helm/mail/templates/statefulset.yaml +++ b/helm/mail/templates/statefulset.yaml @@ -88,6 +88,10 @@ spec: - secretRef: name: {{ $fullName | quote }} {{- end }} + {{- if .Values.existingSecret }} + - secretRef: + name: {{ .Values.existingSecret | quote }} + {{- end }} {{ with .Values.extraEnv }}env: {{- toYaml . | nindent 12 }}{{ end }} volumeMounts: - mountPath: /var/spool/postfix diff --git a/helm/mail/values.yaml b/helm/mail/values.yaml index 663d921..448453f 100644 --- a/helm/mail/values.yaml +++ b/helm/mail/values.yaml @@ -90,6 +90,10 @@ certs: # hello: world secret: {} +# Use an existing secret to share with the pod +# as environment variables. +existingSecret: "" + # Define a secret which should be deployed together with the # chart amd mounted into a specific directory in the pod. mountSecret: @@ -172,4 +176,4 @@ startupProbe: ps axf | fgrep -v grep | fgrep -q 'opendkim.sh' lifecycle: - postStart: {} \ No newline at end of file + postStart: {}