Draft: Add a cells-mailroom subchart
What this does
Adds a cells-mailroom subchart that deploys the cells-aware mailroom service, plus the chart-side support for the asymmetric (ES256) mailroom JWT the service uses. Part of gitlab-org/gitlab#604170.
The service (cells-mailroom/ in the GitLab repo) is deployed once for all cells: it polls the incoming email and Service Desk mailboxes and forwards each message to the owning cell, resolved through the Topology Service, instead of posting to Workhorse. Image is built separately in CNG (gitlab-org/build/CNG!3101 (closed)).
Two commits
-
Support asymmetric mailroom JWT public keys — renders
public_key_filesunderincoming_email/service_desk_emailin the Railsgitlab.ymlfrom a newpublicKeyFileslist, and projects each secret onto the Webservice pods (which serve the internal API that verifies the token). The symmetricauthTokenis untouched, so a deployment can run either or both. This is the only change touching shared templates. -
Add a cells-mailroom subchart — new subchart, disabled by default, purely additive.
Design notes
- Renders a
gitlab.yml, notmail_room.yml— the service reads a GitLab-format config the same way the in-cell mailroom does. Mailbox/Topology settings reuse the existingglobal.appConfig.*values, so there's a single source of truth. This was a deliberate choice to avoid modifying the existing, in-use mailroom chart during rollout. - Topology Service mTLS reuses the existing generic helpers (
gitlab.topologyService.mountSecrets). - Arbitration reuses the queues Redis and the same
mail_room:gitlablock namespace as the in-cell mailroom, so the two never double-process a message while both run. - Liveness: the service serves mail_room's
/liveness. The probe port and the renderedhealth_check.portcome from a single value so they can't drift — if the port were unset the service starts no server and the pod would crash-loop. NoServiceis needed (kubelet probes the pod directly), matching the existing mailroom subchart.
Testing
spec/configuration/cells_mailroom_spec.rb(new, 14 examples) — enabled/disabled, mailbox rendering, TS cert paths, cell endpoint, health-check/probe coupling, projected secrets, and the ES256public_key_filesrendering + Webservice mount.- Existing
mailroom_spec.rb(42) andwebservice_spec.rb(8) still green — the shared-template change is backward compatible. - Rendered
gitlab.ymlverified by hand: ERB password/redis substitution intact, TS certs mounted, container uses the image's defaultbundle exec ruby run.rb.
Docs: a short page under doc/charts/gitlab/cells-mailroom/ that links to the service's own reference (cells-mailroom/DEPLOYMENT.md) rather than duplicating it.