WPB-27175: Add Galley meetings email config plumbing - #5346
Conversation
| # # smtpConnType: tls | ||
| # # smtpCredentials: | ||
| # # smtpUsername: meetings | ||
| # # smtpPassword: /etc/wire/galley/secrets/smtp-password.txt |
There was a problem hiding this comment.
I'm wondering why this needs to be configurable? Are there real alternative values for smtpPassword?
There was a problem hiding this comment.
I'm not sure to get this right:
- It's how it is done in Brig (we could discuss if it is the right way to do)
- We will need it to configure a dedicated email address for Wire Meetings emails
Please let me know if one of these answer to your question.
There was a problem hiding this comment.
Sorry for the confusion 馃槄
There are a couple of separate things:
- I would argue that there is little value in being able to set this path, because it is determined by the way the secret is mounted. However, we could keep this aligned to brig's code, as two ways for one thing would be confusing as well 馃槄 Also, we should probably not change existing Helm values without consulting the downstream teams first... 馃
- I cannot spot the usage of
smtpCredentials.smtpPassword. Could it be that there is some ConfigMap change missing? - This still seems to be asymmetric to brig, because for brig's values this is called
passwordFileand then used in the ConfigMap like:( ){{- if .smtp.username }} smtpCredentials: smtpUsername: {{ .smtp.username }} smtpPassword: {{ .smtp.passwordFile }} {{- end }}
There was a problem hiding this comment.
I have aligned on Brig, let me know what you think.
Add optional settings.meetings.email to Galley for meeting-invitation emails: a required 'from' sender, optional 'replyTo', and a 'transport' selecting AWS SES or SMTP. When the block is absent, meeting emails are disabled. For SMTP, set galley.secrets.smtpPassword (mounted at /etc/wire/galley/secrets/smtp-password.txt). Configuration plumbing only; no runtime behaviour yet (_email is Maybe and read by nothing). Email sending itself lands in a follow-up. The SES/SMTP option types move from Brig.Options into a new shared module Wire.EmailSending.Options so Brig and Galley use one definition; Brig consumers (AWS/App/Run + test integration Run) import the types directly from there.
89a7118 to
c887cdb
Compare
Address PR #5346 review feedback: the SMTP password handling was asymmetric to Brig, which renders a dedicated smtp.passwordFile value into transport.smtpCredentials.smtpPassword. Replace Galley's toYaml passthrough of settings.meetings with explicit field-by-field ConfigMap rendering (mirroring brig/configmap.yaml). The flat Helm values now use a useSES selector with aws/smtp sub-blocks; the ConfigMap translates these into the nested transport: object that EmailOpts FromJSON expects (SES = {sesQueue, sesEndpoint}; SMTP = {smtpEndpoint, smtpConnType, smtpCredentials?}). The SMTP password path comes from a dedicated email.smtp.passwordFile value (not an inline string), so the mounted secret value never enters the ConfigMap. Helm-only keys (useSES, aws, smtp, passwordFile) do not leak into the rendered galley.yaml. The Haskell types are unchanged; galley.integration.yaml keeps its nested transport shape (read directly by Galley, not via the ConfigMap). - charts/wire-server/templates/galley/configmap.yaml: explicit rendering - charts/wire-server/values.yaml: flat useSES/aws/smtp/passwordFile example - hack/helm_vars/wire-server/values.yaml.gotmpl: CI block to flat form - docs config-options.md + changelog: document the passwordFile mapping
| `galley.secrets.smtpPassword` holds the value (mounted at | ||
| `/etc/wire/galley/secrets/smtp-password.txt`). The Galley ConfigMap injects that | ||
| path into `transport.smtpCredentials.smtpPassword`, the same pattern Brig uses | ||
| for `smtp.passwordFile`. Email sending itself lands in a follow-up. |
There was a problem hiding this comment.
| for `smtp.passwordFile`. Email sending itself lands in a follow-up. | |
| for `smtp.passwordFile`. |
I would drop the last sentence, because things like this are easy to be forgotten. 馃樃
| username: {{ .Values.rabbitmqUsername }} | ||
| password: {{ .Values.rabbitmqPassword }} | ||
| pgPassword: posty-the-gres | ||
| smtpPassword: dummy-smtp-password |
There was a problem hiding this comment.
Do we need this value? Is this used for SES as well? 馃
supersven
left a comment
There was a problem hiding this comment.
My comments are probably worth to check / consider. However, nothing that would block merging.
Drop the stale "follow-up" sentence from config-options.md and remove the unused Galley smtpPassword from the integration gotmpl, which runs meetings-email in SES mode and never consumes it (mirrors Brig's not-useSES guard). Addresses @supersven's comments on PR #5346.
https://wearezeta.atlassian.net/browse/WPB-27175
Checklist
changelog.d