Skip to content

fix(pgbouncer): PgBouncer is unreachable when the release name does not contain "flagsmith" - #574

Merged
germangarces merged 1 commit into
mainfrom
fix/pgbouncer-hostname-release-name-mismatch
Jul 31, 2026
Merged

fix(pgbouncer): PgBouncer is unreachable when the release name does not contain "flagsmith"#574
germangarces merged 1 commit into
mainfrom
fix/pgbouncer-hostname-release-name-mismatch

Conversation

@germangarces

Copy link
Copy Markdown
Member

Thanks for submitting a PR! Please check the boxes below:

  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?

Changes

With PgBouncer switched on, the API never started — it could not reach PgBouncer.

The chart built PgBouncer's name in two different ways, so the address given to the API did not match the name of the PgBouncer service. They only matched when the release name contained "flagsmith", which is what our docs use, so nobody hit it.

Release name PgBouncer service Address given to the API
flagsmith flagsmith-pgbouncer flagsmith-pgbouncer works
fs fs-flagsmith-pgbouncer fs-pgbouncer broken
  • Build the address the same way the service name is built.

Note for release notes: anyone who worked around this with fullnameOverride will see the address change again.

How did you test this code?

helm install fs charts/flagsmith -n test --set pgbouncer.enabled=true --wait

Before: API pod stuck retrying could not translate host name "fs-pgbouncer...".
After: install finishes, API pod 1/1 Running, PgBouncer logs show it logging in.

Also rendered four release names plus nameOverride and fullnameOverride — address matches the service every time, and the names that already worked are unchanged. helm lint passes. Kubernetes v1.35.1.

Review effort: 1/5

@matthewelwell matthewelwell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will this affect existing deployments?

@germangarces

Copy link
Copy Markdown
Member Author

How will this affect existing deployments?

The host only changes where it did not match the Service, so PgBouncer was already unreachable

@germangarces
germangarces force-pushed the fix/pgbouncer-hostname-release-name-mismatch branch from c6f2ae6 to 079b7ad Compare July 31, 2026 13:03
@germangarces
germangarces enabled auto-merge (squash) July 31, 2026 13:09
@germangarces
germangarces force-pushed the fix/pgbouncer-hostname-release-name-mismatch branch from 079b7ad to 722bf00 Compare July 31, 2026 13:11
@germangarces
germangarces merged commit e741078 into main Jul 31, 2026
1 check passed
@germangarces
germangarces deleted the fix/pgbouncer-hostname-release-name-mismatch branch July 31, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants