Match Praefect's configuration format in Omnibus
The configuration formats of Praefect and Omnibus deviate from each other creating a few problems: 1. Configuration keys for the same option differ between the context of Omnibus and Praefect creating confusion for the user. 2. Each new key added requires duplicate work to map the different keys into Omnibus. This change introduces praefect['configuration'] matching configuration in Omnibus with Praefect's own format. The previous configuration keys are remapped into this new format to assist administrators during the transition period. The tomlrb gem does not supporting encoding TOML, so the tomlib gem has been added as a dependency. The configuration values are now serialized directly into TOML instead of using a template. Removes unneeded values allowing Praefect's own source to be the single source of truth for configuration. Updates tests because the new serialization method does not output empty config sections. Guards are included to prevent errors with latency configurations that must be arrays where the previous configuration expected a string until such time as Praefect's own validation subroutines are implemented. Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7422 Changelog: changed
parent
9e712aac1bf9
No related branches found
No related tags found
Showing
- Gemfile 1 addition, 0 deletionsGemfile
- Gemfile.lock 2 additions, 0 deletionsGemfile.lock
- config/patches/tomlib/license/add-license-file.patch 27 additions, 0 deletionsconfig/patches/tomlib/license/add-license-file.patch
- config/software/gitaly.rb 1 addition, 0 deletionsconfig/software/gitaly.rb
- config/software/tomlib.rb 36 additions, 0 deletionsconfig/software/tomlib.rb
- files/gitlab-config-template/gitlab.rb.template 0 additions, 1 deletionfiles/gitlab-config-template/gitlab.rb.template
- files/gitlab-cookbooks/praefect/attributes/default.rb 14 additions, 38 deletionsfiles/gitlab-cookbooks/praefect/attributes/default.rb
- files/gitlab-cookbooks/praefect/libraries/praefect.rb 180 additions, 0 deletionsfiles/gitlab-cookbooks/praefect/libraries/praefect.rb
- files/gitlab-cookbooks/praefect/recipes/enable.rb 3 additions, 9 deletionsfiles/gitlab-cookbooks/praefect/recipes/enable.rb
- files/gitlab-cookbooks/praefect/templates/default/praefect-config.toml.erb 1 addition, 146 deletions...books/praefect/templates/default/praefect-config.toml.erb
- spec/chef/cookbooks/praefect/recipes/praefect_spec.rb 258 additions, 34 deletionsspec/chef/cookbooks/praefect/recipes/praefect_spec.rb
Loading
Please register or sign in to comment