sidekiq-cluster throws errors for certain gitlab.yml configs

Summary

sidekiq-cluster throws errors if there is blank config in gitlab.yml that it is referenced by sidekiq-cluster.

sidekiq_1              | {"severity":"INFO","time":"2021-12-22T17:22:28.500Z","message":"Starting cluster with 1 processes"}
sidekiq_1              | /srv/gitlab/sidekiq_cluster/cli.rb:203:in `sidekiq_exporter_enabled?': undefined method `enabled' for nil:NilClass (NoMethodError)
sidekiq_1              | 	from /srv/gitlab/sidekiq_cluster/cli.rb:231:in `metrics_server_enabled?'
sidekiq_1              | 	from /srv/gitlab/sidekiq_cluster/cli.rb:191:in `start_metrics_server'
sidekiq_1              | 	from /srv/gitlab/sidekiq_cluster/cli.rb:106:in `run'
sidekiq_1              | 	from bin/sidekiq-cluster:11:in `<main>'

Steps to reproduce

  1. Have a blank sidekiq_exporter setting in your gitlab.yml, and run the sidekiq_cluster binary
production: &base
  monitoring:
    sidekiq_exporter:

What is the current bug behavior?

Sidekiq cluster is missing any of the gitlab initializer logic, so doesn't have any setting defaults in place.

What is the expected correct behavior?

That the gitlab settings work the same in sidekiq_cluster as they do in the rails applicaiton

Possible fixes

Load the settings initializer in sidekiq_cluster

Edited by DJ Mountney