feat(email): add outgoing email toggle

What does this MR do?

Adds global.email.enabled, defaulting to true, and renders it as the native Boolean email_enabled value in gitlab.yml for GitLab Rails components.

Air-gapped installations may intentionally have no mail transport. Disabling SMTP alone allows GitLab to fall back to local sendmail, which causes mailer jobs to fail repeatedly and accumulate in the Sidekiq retry and dead queues. Setting global.email.enabled: false now disables delivery attempts completely while preserving the existing default behavior for other installations.

Verification

  • helm lint . passes.
  • Helm template rendering was verified for the default true value and an explicitly configured false value.
  • A configuration spec covers webservice, Sidekiq, and Toolbox and verifies that the rendered values are native YAML Booleans.
  • The chart was deployed end-to-end on a Rancher Desktop Kubernetes cluster with global.email.enabled: false.
  • The running GitLab configuration was verified to load email_enabled=false as a Ruby FalseClass, with no sendmail-related Sidekiq failures observed.

This change follows the discussion in Disable outgoing email completely in GitLab Helm Chart.

The solution was originally identified and verified by canubemy2meow on the GitLab Forum.

cc @dnsmichi, who participated in the forum discussion 👋🏻

Author checklist

For general guidance, please follow our Contributing guide.

Required

For anything in this list which will not be completed, please provide a reason in the MR discussion.

  • Merge Request Title and Description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • MR has a green pipeline.
  • Documentation created/updated.
  • Tests added/updated.
  • Have you validated that your change works end-to-end on a real cluster deployment?
    • Describe how you did it in a comment.
  • Equivalent MR/issue for omnibus-gitlab opened.

Reviewers checklist

Edited by Clemens Beck

Merge request reports

Loading
Loading