From 4ab707d9dca6c443516976b5be88191d1091242c Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Wed, 22 Apr 2026 15:54:25 +0200 Subject: [PATCH] fix e2e test and bump alpine version --- .github/workflows/publish_ghcr_image.yaml | 2 +- e2e/tests/test_e2e.py | 10 +++++----- pooler/Dockerfile | 2 +- pooler/pgbouncer.ini.tmpl | 5 ++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish_ghcr_image.yaml b/.github/workflows/publish_ghcr_image.yaml index 84bb85246..3cc9a01cc 100644 --- a/.github/workflows/publish_ghcr_image.yaml +++ b/.github/workflows/publish_ghcr_image.yaml @@ -81,7 +81,7 @@ jobs: with: context: pooler push: true - build-args: BASE_IMAGE=alpine:3.19 + build-args: BASE_IMAGE=alpine:3.22 tags: "${{ steps.image_pooler.outputs.POOLER_IMAGE }}" platforms: linux/amd64,linux/arm64 diff --git a/e2e/tests/test_e2e.py b/e2e/tests/test_e2e.py index 70145f3e4..e4d9d6044 100644 --- a/e2e/tests/test_e2e.py +++ b/e2e/tests/test_e2e.py @@ -698,7 +698,7 @@ class EndToEndTestCase(unittest.TestCase): self.eventuallyEqual(lambda: k8s.count_running_pods(master_pooler_label), 2, "No pooler pods found") self.eventuallyEqual(lambda: k8s.count_running_pods(replica_pooler_label), 2, "No pooler replica pods found") self.eventuallyEqual(lambda: k8s.count_services_with_label(pooler_label), 2, "No pooler service found") - self.eventuallyEqual(lambda: k8s.count_secrets_with_label(pooler_label), 1, "Pooler secret not created") + self.eventuallyEqual(lambda: k8s.count_secrets_with_label(pooler_label), 3, "Not all pooler secrets found") # TLS still enabled so check existing env variables and volume mounts self.eventuallyEqual(lambda: k8s.count_pods_with_env_variable("CONNECTION_POOLER_CLIENT_TLS_CRT", pooler_label), 4, "TLS env variable CONNECTION_POOLER_CLIENT_TLS_CRT missing in pooler pods") @@ -758,7 +758,7 @@ class EndToEndTestCase(unittest.TestCase): self.eventuallyEqual(lambda: k8s.count_services_with_label(pooler_label), 1, "No pooler service found") self.eventuallyEqual(lambda: k8s.count_secrets_with_label(pooler_label), - 1, "Secret not created") + 2, "Not all pooler secrets created") # Turn off only replica connection pooler k8s.api.custom_objects_api.patch_namespaced_custom_object( @@ -786,7 +786,7 @@ class EndToEndTestCase(unittest.TestCase): 'ClusterIP', "Expected LoadBalancer service type for master, found {}") self.eventuallyEqual(lambda: k8s.count_secrets_with_label(pooler_label), - 1, "Secret not created") + 2, "Not all pooler secrets created") # scale up connection pooler deployment k8s.api.custom_objects_api.patch_namespaced_custom_object( @@ -821,8 +821,8 @@ class EndToEndTestCase(unittest.TestCase): 0, "Pooler pods not scaled down") self.eventuallyEqual(lambda: k8s.count_services_with_label(pooler_label), 0, "Pooler service not removed") - self.eventuallyEqual(lambda: k8s.count_secrets_with_label('application=spilo,cluster-name=acid-minimal-cluster'), - 4, "Secrets not deleted") + self.eventuallyEqual(lambda: k8s.count_secrets_with_label(pooler_label), + 0, "Not all pooler secrets deleted") # Verify that all the databases have pooler schema installed. # Do this via psql, since otherwise we need to deal with diff --git a/pooler/Dockerfile b/pooler/Dockerfile index 107159e10..6c6879475 100644 --- a/pooler/Dockerfile +++ b/pooler/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=alpine:3.19 +ARG BASE_IMAGE=alpine:3.22 FROM ${BASE_IMAGE} AS build_stage RUN apk --update add \ diff --git a/pooler/pgbouncer.ini.tmpl b/pooler/pgbouncer.ini.tmpl index 33442cd61..c26cf1453 100644 --- a/pooler/pgbouncer.ini.tmpl +++ b/pooler/pgbouncer.ini.tmpl @@ -24,9 +24,8 @@ client_tls_sslmode = require client_tls_key_file = /etc/ssl/certs/pgbouncer.key client_tls_cert_file = /etc/ssl/certs/pgbouncer.crt -log_connections = 1 -log_disconnections = 1 -verbose = 1 +log_connections = 0 +log_disconnections = 0 # Number of prepared statements to cache on a server connection (zero value # disables support of prepared statements).