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
truevalue and an explicitly configuredfalsevalue. - 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=falseas a RubyFalseClass, with no sendmail-related Sidekiq failures observed.
Related issues
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 foromnibus-gitlabopened.- Not applicable: Omnibus GitLab already exposes the equivalent
gitlab_email_enabledsetting since 7.8 (gitlab-org/omnibus-gitlab@3e6f314e).
- Not applicable: Omnibus GitLab already exposes the equivalent
Reviewers checklist
- MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab.
- Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.