Configuring Email Support
The Cortex Helm Chart needs to be configured against an SMTP server to send emails for notifications, inviting users, password changes, and tenant registrations on behalf of a specified user.
Google/Gmail's SMTP server
By default the deployment is configured against Google's SMTP server and only the email
,password
, and from
values under cortex.smtp
needed to be provided when installed via helm
.
The following is the default configuration packaged with the helm chart,
cortex: smtp: # A VALID EMAIL AND PASSWORD MUST BE PROVIDED TO RECEIVE INVITATION EMAILS # cortex.smtp.email: The email used to send invitation/notification emails to users email: 'dev@gmail.com' # cortex.smtp.password: The password for the cortex.smtp.email account password: '' # cortex.smtp.port: The port on the SMTP server listening to traffic port: 465 # cortex.smtp.from: The FROM header on notification emails from: 'Dev User <dev@gmail.com>' # cortex.smtp.host: The SMTP server to use for sending emails host: 'smtp.gmail.com'
Optional override
You can optionally override the default SMTP settings.
With the Cortex Helm Chart, you have the ability to specify an optional accounts.nodemailerConfigMap
value override with the name of a kubernetes ConfigMap that contains a json document of the smtp configuration options set for the Nodemailer's transport.
Nodemailer configuration via configMap
Create a JSON document with the Nodemailer SMTP override settings.
cat << EOM > nodemailer.json{"host": "test.mailu.io","secure": false,"port": 587,"auth": {"user": "admin@test.mailu.io","pass": "letmein"}}EOMCreate a ConfigMap
cortex-accounts-nodemailer
in the cortex namespace from the JSON file, with file key beingnodemailer.json
. NOTE:--from-file=nodemailer.json=nodemailer.json
ensures the key isnodemailer.json
, otherwise the pod will not start correctly.```kubectl create configmap -n cortex cortex-accounts-nodemailer --from-file=nodemailer.json```Set the helm values override
accounts.nodemailerConfigMap
to make the accounts service load the nodemailer configMap.helm install|upgrade ... --set accounts.nodemailerConfigMap=cortex-accounts-nodemailer