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

  1. Support asymmetric mailroom JWT public keys — renders public_key_files under incoming_email/service_desk_email in the Rails gitlab.yml from a new publicKeyFiles list, and projects each secret onto the Webservice pods (which serve the internal API that verifies the token). The symmetric authToken is untouched, so a deployment can run either or both. This is the only change touching shared templates.

  2. Add a cells-mailroom subchart — new subchart, disabled by default, purely additive.

Design notes

  • Renders a gitlab.yml, not mail_room.yml — the service reads a GitLab-format config the same way the in-cell mailroom does. Mailbox/Topology settings reuse the existing global.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:gitlab lock 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 rendered health_check.port come 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. No Service is 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 ES256 public_key_files rendering + Webservice mount.
  • Existing mailroom_spec.rb (42) and webservice_spec.rb (8) still green — the shared-template change is backward compatible.
  • Rendered gitlab.yml verified by hand: ERB password/redis substitution intact, TS certs mounted, container uses the image's default bundle 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.

Merge request reports

Loading
Loading