From 93ac0873670ae5a7b684ca74c8a80702c5e052ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9fano?= <93345073+stefano-daitan@users.noreply.github.com> Date: Wed, 1 Dec 2021 10:17:13 -0300 Subject: [PATCH] Added support to SMTP server for password recovery (#5) --- charts/orb/Chart.yaml | 2 +- charts/orb/README.md | 11 +++++++++++ charts/orb/templates/users-deployment.yaml | 17 +++++++++++++++++ charts/orb/values.yaml | 5 +++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/charts/orb/Chart.yaml b/charts/orb/Chart.yaml index 8ddcea8..2f87ec5 100644 --- a/charts/orb/Chart.yaml +++ b/charts/orb/Chart.yaml @@ -10,7 +10,7 @@ name: orb description: Orb Observability Platform icon: https://avatars1.githubusercontent.com/u/13207490 type: application -version: 1.0.6 +version: 1.0.7 appVersion: "0.9.0" home: https://getorb.io sources: diff --git a/charts/orb/README.md b/charts/orb/README.md index d06cfa8..a6403d1 100644 --- a/charts/orb/README.md +++ b/charts/orb/README.md @@ -71,8 +71,19 @@ helm install cert-manager jetstack/cert-manager --namespace cert-manager --creat * `kubectl create -f issuers/production-issuer.yaml -n orb` * Install orb. Replace `my-orb` with your helm release name. +Check the [optional variables](#optional-variables-to-set) for more options. ``` helm install --set ingress.hostname=HOSTNAME -n orb my-orb . ``` +### Optional variables to set +- **SMTP** + + Set the following variables to enable SMTP support for password recovery: + - `smtp.host`: SMTP server hostname to send e-mails to. + - `smtp.port`: SMTP server port, defaults to `25`. + - `smtp.fromName`: E-mail sender display name. Defaults to `Orb`. + - `smtp.fromAddress`: E-mail address of the sender. + - `smtp.usernmame`: username used when authenticating to the SMTP server used for sending e-emails. + - `smtp.password`: password used when authenticating to the SMTP server used for sending e-emails. \ No newline at end of file diff --git a/charts/orb/templates/users-deployment.yaml b/charts/orb/templates/users-deployment.yaml index 79ad149..aad8c91 100644 --- a/charts/orb/templates/users-deployment.yaml +++ b/charts/orb/templates/users-deployment.yaml @@ -65,6 +65,23 @@ spec: secretKeyRef: name: {{ .Values.users.admin.secretName }} key: {{ .Values.users.admin.passwordSecretKey }} + + {{- if .Values.orb.smtp.host }} + - name: MF_EMAIL_HOST + value: {{ .Values.orb.smtp.host | quote }} + - name: MF_EMAIL_PORT + value: {{ .Values.orb.smtp.port | quote }} + - name: MF_EMAIL_USERNAME + value: {{ required "A valid .Values.orb.smtp.username is required!" .Values.orb.smtp.username | quote }} + - name: MF_EMAIL_PASSWORD + value: {{ required "A valid .Values.orb.smtp.password is required!" .Values.orb.smtp.password | quote }} + - name: MF_EMAIL_FROM_ADDRESS + value: {{ required "A valid .Values.orb.smtp.fromAddress is required!" .Values.orb.smtp.fromAddress | quote }} + - name: MF_EMAIL_FROM_NAME + value: {{ .Values.orb.smtp.fromName | quote }} + - name: MF_EMAIL_TEMPLATE + value: "/email.tmpl" + {{- end }} image: "{{ default .Values.defaults.image.mfRepository .Values.users.image.repository }}/users:{{ default .Values.defaults.image.mfTag .Values.users.image.tag }}" imagePullPolicy: {{ default .Values.defaults.image.pullPolicy .Values.users.image.pullPolicy }} name: {{ .Release.Name }}-users diff --git a/charts/orb/values.yaml b/charts/orb/values.yaml index 8d359df..d3f3a56 100644 --- a/charts/orb/values.yaml +++ b/charts/orb/values.yaml @@ -19,6 +19,11 @@ defaults: natsPort: 4222 jaegerPort: 6831 +orb: + smtp: + port: 25 + fromName: Orb + ingress: issuer: "letsencrypt-prod" hostname: ""