Use database attributes for consul watchers
- Refactors the consul watcher recipe for easier reading. - Fixes the example in the gitlab.rb template which shows configuring a complete watcher in the watchers section, when it's really used as just a list of strings that indicate which watcher is enabled - Move the default watcher definition for postgresql into the helper because it is directly tied to static values the user cannot change such as the name of the failover_pgbouncer template - Accomodate the potential for folks who may have created their own watcher, though if they did it was following a very strict set of rules as the ERB template path was hardcoded. Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6562 Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3792 Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6587 Changelog: changed Signed-off-by:Robert Marshall <rmarshall@gitlab.com>
Showing
- files/gitlab-config-template/gitlab.rb.template 1 addition, 6 deletionsfiles/gitlab-config-template/gitlab.rb.template
- files/gitlab-cookbooks/consul/attributes/watchers.rb 0 additions, 5 deletionsfiles/gitlab-cookbooks/consul/attributes/watchers.rb
- files/gitlab-cookbooks/consul/libraries/watch_helper.rb 69 additions, 16 deletionsfiles/gitlab-cookbooks/consul/libraries/watch_helper.rb
- files/gitlab-cookbooks/consul/recipes/watchers.rb 8 additions, 12 deletionsfiles/gitlab-cookbooks/consul/recipes/watchers.rb
- files/gitlab-cookbooks/consul/templates/default/watcher_scripts/failover_pgbouncer.erb 3 additions, 3 deletions.../templates/default/watcher_scripts/failover_pgbouncer.erb
- spec/chef/cookbooks/consul/libraries/watch_helper_spec.rb 15 additions, 0 deletionsspec/chef/cookbooks/consul/libraries/watch_helper_spec.rb
- spec/chef/cookbooks/consul/recipes/consul_watcher_spec.rb 1 addition, 1 deletionspec/chef/cookbooks/consul/recipes/consul_watcher_spec.rb
Loading
Please register or sign in to comment