refactor: extract patroni sql dependencies in lib
What
- Refactor the common patroni dependencies.
- Add README file showing off how to use the library.
Why
patroni is a downstream dependency for a lot of services such as
api, git, web. This resulted into a lot of duplication of code.
Testing
To make sure there are no diffs between the master branch and this
branch run the following:
git switch master
./alertmanager/generate.sh && cp alertmanager/alertmanager.yml /tmp/alertmanager.old
git switch refactor/extract-depend-on-patroni
./alertmanager/generate.sh && cp alertmanager/alertmanager.yml /tmp/alertmanager.new
diff /tmp/alertmanager.old /tmp/alertmanager.new
Reference: https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/15998