Skip to content

Helm: Fix PgBouncer hostname for result backend under standard naming - #71830

Open
dheerenmohta wants to merge 1 commit into
apache:mainfrom
dheerenmohta:fix-pgbouncer-hostname-namespace
Open

Helm: Fix PgBouncer hostname for result backend under standard naming#71830
dheerenmohta wants to merge 1 commit into
apache:mainfrom
dheerenmohta:fix-pgbouncer-hostname-namespace

Conversation

@dheerenmohta

Copy link
Copy Markdown

The auto-generated result-backend connection secret built the PgBouncer hostname from .Release.Name directly, omitting the namespace — unlike the already-correct sibling logic in the metadata connection secret. This silently breaks Celery result-backend to PgBouncer routing whenever useStandardNaming (the chart's own recommended setting) or fullnameOverride is used, since the rendered PgBouncer Service name diverges from .Release.Name.

Derives the PgBouncer host the same way the metadata secret already does, and adds a regression test covering the useStandardNaming: true case.

Note: this does not fully resolve #54875's original ask. Auto-configuring PgBouncer when the metadata connection is backed by an externally-managed, opaque Kubernetes Secret isn't something Helm templating can do, since it can't introspect that Secret's contents at render time. This fixes a real, narrower, verified bug in the chart's own auto-generated-secret path.

related: #54875


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Sonnet 5)

Generated-by: Claude Code (Sonnet 5) following the guidelines

The result backend connection secret built the PgBouncer hostname from
`.Release.Name` directly and omitted the namespace, unlike the metadata
connection secret's equivalent logic. Once `useStandardNaming` is enabled
(the chart's own recommended setting for new installs) or a
`fullnameOverride` is set, the computed hostname no longer matches the
actual PgBouncer Service name, so Celery result-backend traffic silently
fails to route through PgBouncer. Derive the host the same way the
metadata secret already does, via the `airflow.fullname` template plus
namespace, so both secrets stay consistent and resolve correctly
regardless of naming configuration.
@boring-cyborg

boring-cyborg Bot commented Aug 19, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PgBouncer integration should auto-configure metadata connection

1 participant