Skip to content

PoC: share PMM's built-in PostgreSQL with a side container#5637

Draft
ademidoff wants to merge 1 commit into
mainfrom
sep-pg-share-proof
Draft

PoC: share PMM's built-in PostgreSQL with a side container#5637
ademidoff wants to merge 1 commit into
mainfrom
sep-pg-share-proof

Conversation

@ademidoff

Copy link
Copy Markdown
Member

What

A small Docker Compose harness under dev/pg-share-proof/ demonstrating what it takes for a separate container on a shared bridge network to connect to PMM Server's built-in PostgreSQL.

Why

To settle whether opening PMM's PG to a side container requires making PostgreSQL listen on all interfaces, or whether a Compose EXPOSE/ports: directive is enough. It isn't: reachability is decided by listen_addresses (in postgresql.conf), not by pg_hba.conf or Docker port directives.

Contents

  • pg-share-fail.compose.yml — PMM's PG left unchanged (binds 127.0.0.1). A client on the bridge gets Connection refused.
  • pg-share-success.compose.yml + run-success.sh — applies a runtime edit (listen_addresses='*' plus a scram host rule in pg_hba.conf), restarts PG, then the client connects over the bridge and reads real pmm-managed tables.
  • README.md — commands, expected output, and caveats.

Notes

  • Uses percona/pmm-server:3.8.1, pinned to platform: linux/amd64 (no arm64 build yet).
  • Demo only: reuses the pmm-managed role and allows 0.0.0.0/0. Scope the host rule to the bridge subnet and use a dedicated least-privilege role/DB for anything real.

Docker Compose harness under dev/pg-share-proof/ proving that a separate
container on a shared bridge can reach PMM's built-in PostgreSQL only after
listen_addresses is opened in postgresql.conf (plus a pg_hba host rule) --
not via EXPOSE/ports. Includes fail/success compose files, a driver script,
and a README.
@ademidoff ademidoff requested a review from a team as a code owner July 13, 2026 16:29
@ademidoff ademidoff requested review from 4nte and JiriCtvrtka and removed request for a team July 13, 2026 16:29
@ademidoff ademidoff changed the title Add PoC: share PMM's built-in PostgreSQL with a side container PoC: share PMM's built-in PostgreSQL with a side container Jul 13, 2026
@ademidoff ademidoff marked this pull request as draft July 13, 2026 16:30
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.08%. Comparing base (31318c7) to head (19bab13).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5637      +/-   ##
==========================================
+ Coverage   43.59%   44.08%   +0.48%     
==========================================
  Files         415      416       +1     
  Lines       43134    43067      -67     
==========================================
+ Hits        18804    18984     +180     
+ Misses      22454    22204     -250     
- Partials     1876     1879       +3     
Flag Coverage Δ
admin 34.78% <ø> (ø)
agent 50.16% <ø> (+1.11%) ⬆️
managed 43.27% <ø> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant