From 9b443cd25df45ebb41b0cdd84ba4a2f9873df217 Mon Sep 17 00:00:00 2001 From: cross-du Date: Mon, 23 Feb 2026 17:49:03 -0500 Subject: [PATCH 1/3] fix: add component that configures unicorn pgbouncer image --- common/zarf.yaml | 30 ++++++++++++++++++++++++++++++ zarf.yaml | 7 +++++++ 2 files changed, 37 insertions(+) diff --git a/common/zarf.yaml b/common/zarf.yaml index b454be0..bc2b8dd 100644 --- a/common/zarf.yaml +++ b/common/zarf.yaml @@ -57,3 +57,33 @@ components: if ./zarf tools kubectl get postgresql pg-cluster -n postgres; then ./zarf tools wait-for postgresql pg-cluster -n postgres '{.status.PostgresClusterStatus}'=Running fi + + - name: connection-pooler + required: true + only: + flavor: unicorn + actions: + onDeploy: + after: + - description: Configure unicorn connection pooler image + maxTotalSeconds: 300 + cmd: | + CLUSTER_NAME=$(./zarf tools kubectl get postgresql -n postgres -o jsonpath='{.items[0].metadata.name}') + + if [[ -z "$CLUSTER_NAME" ]]; then + echo "No Postgres cluster found in 'postgres' namespace. Skipping..." + exit 0 + fi + + POOLER_ENABLED=$(./zarf tools kubectl get postgresql -n postgres $CLUSTER_NAME -o jsonpath='{.spec.enableConnectionPooler}') + + if [[ "$POOLER_ENABLED" == "true" ]]; then + echo "Configuring connection-pooler" + ./zarf tools wait-for deployment "$CLUSTER_NAME-pooler" -n postgres exists + ./zarf tools kubectl set env -n postgres deployment "$CLUSTER_NAME-pooler" DATABASES_HOST="$CLUSTER_NAME" PGBOUNCER_LISTEN_PORT=5432 + ./zarf tools kubectl patch deployment "$CLUSTER_NAME-pooler" -n postgres -p \ + '{"spec":{"template":{"metadata":{"labels":{"uds/user":"70","uds/group":"70","uds/fsgroup":"70"}}}}}' + ./zarf tools wait-for deployment "$CLUSTER_NAME-pooler" -n postgres + else + echo "Connection pooler not enabled." + fi diff --git a/zarf.yaml b/zarf.yaml index 2058697..9738a5b 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -92,3 +92,10 @@ components: - quay.io/rfcurated/zalando/spilo-17:4.0-p3-jammy-fips-rfcurated # Container image that provides the postgres-exporter sidecar to create a metrics endpoint - quay.io/rfcurated/prometheuscommunity/postgres-exporter:0.19-jammy-scratch-bnt-fips-rfcurated + + - name: connection-pooler + required: true + only: + flavor: unicorn + import: + path: common \ No newline at end of file From 0013e6e922f12ea5ccf75feb5bec5fdec4a2d5b5 Mon Sep 17 00:00:00 2001 From: cross-du Date: Mon, 23 Feb 2026 17:52:56 -0500 Subject: [PATCH 2/3] chore: bump release to 1.15.1-uds.2 --- releaser.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releaser.yaml b/releaser.yaml index f7f95fd..6a81ece 100644 --- a/releaser.yaml +++ b/releaser.yaml @@ -4,10 +4,10 @@ flavors: - name: upstream # renovate-uds: datasource=docker depName=ghcr.io/zalando/postgres-operator extractVersion=^v?(?\d+\.\d+\.\d+)$ - version: 1.15.1-uds.1 + version: 1.15.1-uds.2 - name: registry1 # renovate-uds: datasource=docker depName=registry1.dso.mil/ironbank/opensource/zalando/postgres-operator extractVersion=^v?(?\d+\.\d+\.\d+)$ - version: 1.15.0-uds.1 + version: 1.15.0-uds.2 - name: unicorn # renovate-uds: datasource=docker depName=quay.io/rfcurated/zalando/postgres-operator extractVersion=^v?(?\d+\.\d+\.\d+)$ - version: 1.15.0-uds.1 + version: 1.15.0-uds.2 From 4b8ad037509eae12d5d706477da1fcdf2270a749 Mon Sep 17 00:00:00 2001 From: cross-du Date: Mon, 23 Feb 2026 18:31:47 -0500 Subject: [PATCH 3/3] chore: lint files --- common/zarf.yaml | 6 +++--- zarf.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/zarf.yaml b/common/zarf.yaml index bc2b8dd..ee28a74 100644 --- a/common/zarf.yaml +++ b/common/zarf.yaml @@ -57,11 +57,11 @@ components: if ./zarf tools kubectl get postgresql pg-cluster -n postgres; then ./zarf tools wait-for postgresql pg-cluster -n postgres '{.status.PostgresClusterStatus}'=Running fi - + - name: connection-pooler required: true only: - flavor: unicorn + flavor: unicorn actions: onDeploy: after: @@ -69,7 +69,7 @@ components: maxTotalSeconds: 300 cmd: | CLUSTER_NAME=$(./zarf tools kubectl get postgresql -n postgres -o jsonpath='{.items[0].metadata.name}') - + if [[ -z "$CLUSTER_NAME" ]]; then echo "No Postgres cluster found in 'postgres' namespace. Skipping..." exit 0 diff --git a/zarf.yaml b/zarf.yaml index 9738a5b..11d4990 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -98,4 +98,4 @@ components: only: flavor: unicorn import: - path: common \ No newline at end of file + path: common