Skip to content

fix: bypass HTTP proxy for Patroni REST API calls#1715

Draft
marceloneppel wants to merge 4 commits into
16/edgefrom
fix/proxy-bypass-patroni-api
Draft

fix: bypass HTTP proxy for Patroni REST API calls#1715
marceloneppel wants to merge 4 commits into
16/edgefrom
fix/proxy-bypass-patroni-api

Conversation

@marceloneppel
Copy link
Copy Markdown
Member

@marceloneppel marceloneppel commented May 26, 2026

Issue

Solution

When deployed behind an HTTP proxy, httpx and requests route intra-cluster Patroni API calls through the proxy, causing get_primary() to return None and leaving the charm stuck in "awaiting start of the primary".

Set trust_env=False on all HTTP clients (requests.Session and httpx.AsyncClient) so proxy environment variables are ignored for Patroni communication.

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

Depends on canonical/postgresql-single-kernel-library#132.
Closes #1714.

When deployed behind an HTTP proxy, httpx and requests route intra-cluster
Patroni API calls through the proxy, causing get_primary() to return None
and leaving the charm stuck in "awaiting start of the primary".

Set trust_env=False on all HTTP clients (requests.Session and
httpx.AsyncClient) so proxy environment variables are ignored for
Patroni communication.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…atroni-api

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label May 27, 2026
…atroni-api

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Libraries: Out of sync The charm libs used are out-of-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant