Skip to content

Add webhook delivery method option to config/mail_room.yml

In #1461 (closed), I planned to replace mailroom start command's configuration with a new file generated from a template, similar to what we are doing with k8s helm chart. I forgot two important details:

  • config/mail_room.yml is tight-coupled to config/gitlab.yml. In fact, it is composed from the incoming_email and service_desk_email option in that file. In k8s chart, mailroom configuration file is generated from scratch, and independent from the application config. In contrast, Omnibus depends on some application configurations, especially Redis sentinels. They are quite hard to replicate in Omnibus without putting out a huge amount of effort. Besides, config/mail_room.yml is essential for local development and setup from source code. We may need to find a replacement method.
  • Workhorse endpoint is not accessible when mail_room is loaded. The config file is actually an ERB template. MailRoom processes loads some light-weight code in lib/gitlab/mail_room.rb to render that file. It does not load Rails at all. So, the only way to set workhorse URL is to add a new field, powered by Omnibus, to incomingEmail and serviceDeskEmail configs.

Proposal

  • Add deliver_method, with two options sidekiq and webhook to incoming_email and service_desk_email options of Gitlab config.
  • Add gitlab_url option to the same locations