From aa7ccb47bae3112c42f674fa56be68d2b25af21a Mon Sep 17 00:00:00 2001 From: Jade Deane Date: Fri, 27 Jun 2025 13:32:41 +0000 Subject: [PATCH] fix: add `srCheckPassword` param to support new postgresql-ha stream replication check requirements (#894) ### Add new 'srCheckPassword' postgresql-ha value to support new postgresql-ha stream replication check requirements Per Bitnami's [documentation](https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha#to-1600), a new 'sr_check_user' now exists for the purpose of pgpool preforming stream replication checking. ### Benefits This change allows customizing that role's password by overriding Bitnami's chart value. ### Possible drawbacks None that I'm aware of. ### Applicable issues - Fixes #888 ### Additional information Per #888, the Bitnami PR where customizable stream reapplication check credentials were introduced is https://github.com/bitnami/charts/pull/33552 ### Checklist - [x] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) - [x] Helm templating unittests are added (required when changing anything in `templates` folder) Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/894 Reviewed-by: pat-s Co-authored-by: Jade Deane Co-committed-by: Jade Deane --- README.md | 1 + .../customization-integrity-postgresql-ha.yaml | 8 ++++++++ values.yaml | 2 ++ 3 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 865db83..a6fa7da 100644 --- a/README.md +++ b/README.md @@ -1167,6 +1167,7 @@ Valkey and [Valkey cluster](#valkey-cluster) cannot be enabled at the same time. | `postgresql-ha.postgresql.repmgrPassword` | Repmgr Password | `changeme2` | | `postgresql-ha.postgresql.postgresPassword` | postgres Password | `changeme1` | | `postgresql-ha.pgpool.adminPassword` | pgpool adminPassword | `changeme3` | +| `postgresql-ha.pgpool.srCheckPassword` | pgpool srCheckPassword | `changeme4` | | `postgresql-ha.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`) | `5432` | | `postgresql-ha.persistence.size` | PVC Storage Request for PostgreSQL HA volume | `10Gi` | diff --git a/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml b/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml index efef6ef..9f3358b 100644 --- a/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml @@ -18,6 +18,7 @@ set: password: custom-password-overwritten-by-global-postgresql-password pgpool: adminPassword: custom-password-pgpool + srCheckPassword: custom-password-sr-check service: ports: postgresql: 1234 @@ -75,6 +76,13 @@ tests: equal: path: data["admin-password"] value: "Y3VzdG9tLXBhc3N3b3JkLXBncG9vbA==" + - it: "[postgresql-ha] pgpool.srCheckPassword is applied as expected" + template: charts/postgresql-ha/templates/pgpool/secrets.yaml + asserts: + - documentIndex: 0 + equal: + path: data["sr-check-password"] + value: "Y3VzdG9tLXBhc3N3b3JkLXNyLWNoZWNr" - it: "[postgresql-ha] persistence.size is applied as expected" template: charts/postgresql-ha/templates/postgresql/statefulset.yaml asserts: diff --git a/values.yaml b/values.yaml index c3b9d01..c2eaced 100644 --- a/values.yaml +++ b/values.yaml @@ -557,6 +557,7 @@ valkey: ## @param postgresql-ha.postgresql.repmgrPassword Repmgr Password ## @param postgresql-ha.postgresql.postgresPassword postgres Password ## @param postgresql-ha.pgpool.adminPassword pgpool adminPassword +## @param postgresql-ha.pgpool.srCheckPassword pgpool srCheckPassword ## @param postgresql-ha.service.ports.postgresql PostgreSQL service port (overrides `service.ports.postgresql`) ## @param postgresql-ha.persistence.size PVC Storage Request for PostgreSQL HA volume postgresql-ha: @@ -572,6 +573,7 @@ postgresql-ha: password: changeme4 pgpool: adminPassword: changeme3 + srCheckPassword: changeme4 service: ports: postgresql: 5432