The postgresql-ha provides a dedicated deployment and service called pgpool. This application is a proxy that routes the db queries to the active database replica. There's a note about that in their README1 .
Issue #502 is a side-effect of not using that proxy.
Possible drawbacks
Using the Charts' default configuration, the pgpool deployment has 1 replica, making this a single-point of failure. But users can change the related postgresql-ha.pgpool.replicaCount to their needs.
### Description of the change
The `postgresql-ha` provides a dedicated deployment and service called `pgpool`. This application is a proxy that routes the db queries to the active database replica. There's a note about that in their README[^1].
Issue #502 is a side-effect of not using that proxy.
### Possible drawbacks
Using the Charts' default configuration, the `pgpool` deployment has 1 replica, making this a single-point of failure. But users can change the related `postgresql-ha.pgpool.replicaCount` to their needs.
### Applicable issues
- fixes #502
### Checklist
- [x] Templating unittests are added
[^1]: https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml#introduction
I wanted to verify that the build actually fails. Adding the actual fix now...
The build failed because the added test failed.
```
FAIL config template | database section (postgresql-ha) unittests/config/database-section_postgresql-ha.yaml
- connects to pgpool service
- asserts[0] `matchRegex` fail
Template: gitea/templates/gitea/config.yaml
DocumentIndex: 0
Path: stringData.database
Expected to match:
HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.cluster.local:5432
Actual:
DB_TYPE=postgres
HOST=gitea-unittests-postgresql-ha-postgresql.testing.svc.cluster.local:5432
NAME=gitea
PASSWD=gitea
USER=gitea
```
I wanted to verify that the build actually fails. Adding the actual fix now...
pat-s
(Migrated from gitea.com)
reviewed 2023-10-14 15:40:05 +00:00
Oh wow, another deep dive and 🚀 -like find of yours! 👏
That indeed all makes sense and should fix#502.
Also great to see the power of helm-unittest - using it like this is really great.
Oh wow, another deep dive and 🚀 -like find of yours! 👏
That indeed all makes sense and should fix #502.
Also great to see the power of `helm-unittest` - using it like this is really great.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description of the change
The
postgresql-haprovides a dedicated deployment and service calledpgpool. This application is a proxy that routes the db queries to the active database replica. There's a note about that in their README1 .Issue #502 is a side-effect of not using that proxy.
Possible drawbacks
Using the Charts' default configuration, the
pgpooldeployment has 1 replica, making this a single-point of failure. But users can change the relatedpostgresql-ha.pgpool.replicaCountto their needs.Applicable issues
Checklist
https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml#introduction ↩︎
The build failed because the added test failed.
I wanted to verify that the build actually fails. Adding the actual fix now...
Oh wow, another deep dive and 🚀 -like find of yours! 👏
That indeed all makes sense and should fix #502.
Also great to see the power of
helm-unittest- using it like this is really great.