diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 727eea0..8d3b868 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -46,6 +46,31 @@ spec: {{- with .Values.extraEnv }} {{- toYaml . | nindent 12 }} {{- end }} + - name: SMTP_SERVER_HOST + valueFrom: + configMapKeyRef: + name: smtp-config + key: smtp.host + - name: SMTP_SERVER_USERNAME + valueFrom: + configMapKeyRef: + name: smtp-config + key: smtp.user + - name: SMTP_SERVER_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.smtp.passwordSecret }} + key: {{ .Values.smtp.passwordKey }} + - name: SITE_MAIL_SENDER + valueFrom: + configMapKeyRef: + name: smtp-config + key: smtp.sendFrom + - name: SITE_MAIL_RECEIVER + valueFrom: + configMapKeyRef: + name: smtp-config + key: smtp.sendTo {{- with .Values.livenessProbe }} livenessProbe: {{- toYaml . | nindent 12 }} diff --git a/helm/templates/smtp-cm.yaml b/helm/templates/smtp-cm.yaml new file mode 100644 index 0000000..84c6c3b --- /dev/null +++ b/helm/templates/smtp-cm.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: smtp-config +data: + smtp.host: {{ .Values.smtp.host }} + smtp.user: {{ .Values.smtp.user }} + smtp.sendFrom: {{ .Values.smtp.sendFrom }} + smtp.sendTo: {{ .Values.smtp.sendTo }} diff --git a/helm/values.yaml b/helm/values.yaml index 4f49da6..8082553 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -101,3 +101,11 @@ nodeSelector: {} tolerations: [] affinity: {} + +smtp: + host: mail.example.com + user: "" + passwordSecret: "" + passwordKey: password + sendFrom: "" + sendTo: ""