UBI mailroom container fails to start - missing webrick

Summary

The UBI version of mailroom container fails to start due to webrick missing. When Ruby was updated to version 3.x, webrick is no longer included [https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/]. Webrick is present in older versions of the mailroom container and the Debian version of our current mailroom container.

Steps to reproduce

  1. Install GitLab helm chart with inbound email enabled.
  2. Run kubectl get pods. The mailroom pod will be in a CrashLoopBackOff state.
  3. View the pod logs for the mailroom container Error: cannot load such file -- webrick (LoadError)

You can also confirm this by starting the mailroom containers in docker, getting a shell in the container and using find to verify the presence / absence of the webrick gem.

Relevant logs and/or screenshots

Pod Logs

$ kubectl logs gitlab-mailroom-7579fb6f7b-6scs9 -c mailroom
Begin parsing .erb templates from /etc
{"severity":"INFO","time":"2023-09-20T13:56:04.420+00:00","context":{"email":"test.gitlab.inbound@gmail.com","name":"inbox"},"action":"Quitting connection..."}
{"severity":"INFO","time":"2023-09-20T13:56:04.420+00:00","context":{"email":"test.gitlab.inbound@gmail.com","name":"inbox"},"action":"Terminating watching thread..."}
{"severity":"INFO","time":"2023-09-20T13:56:04.421+00:00","context":{"email":"test.gitlab.inbound@gmail.com","name":"inbox"},"action":"Done with thread cleanup"}
<internal:/usr/lib64/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:86:in `require': cannot load such file -- webrick (LoadError)
        from <internal:/usr/lib64/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/health_check.rb:39:in `create_server'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/health_check.rb:15:in `run'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/coordinator.rb:21:in `run'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/cli.rb:58:in `start'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/bin/mail_room:5:in `<top (required)>'

Incoming Email Config From Values.yaml

  appConfig:
    incomingEmail:
      enabled: true
      address: test.gitlab.inbound@gmail.com
      host: imap.gmail.com
      port: 993
      ssl: true
      startTls: false
      user: test.gitlab.inbound@gmail.com
      password:
        secret: incoming-email-password
        key: secret
      mailbox: inbox
      deliveryMethod: webhook
      authToken: {}