bcgov / cas-postgres

Postgres container image intended for OpenShift and general usage
Apache License 2.0
2 stars 0 forks source link

feat: patroni on_role_change #58

Closed dleard closed 3 years ago

dleard commented 4 years ago

adds on_rolechange to patroni helm chart https://patroni.readthedocs.io//downloads/en/master/pdf/ (page 37) adds a (wip) script to run when a patroni pod changes roles, the script currently only echoes the args to see what is passed in.

The idea is that with the args passed to the script from on_role_change, we can kill a pod that has been demoted from leader to replica via the kubernetes api.

EDIT: The approach to this has changed. We are replacing the default callback_endpoint.py with a custom one that has extra functions to cover a patroni pod role change from leader to replica.

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 1 Security Hotspot to review)
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication