PoC: share PMM's built-in PostgreSQL with a side container#5637
Draft
ademidoff wants to merge 1 commit into
Draft
PoC: share PMM's built-in PostgreSQL with a side container#5637ademidoff wants to merge 1 commit into
ademidoff wants to merge 1 commit into
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 bylisten_addresses(inpostgresql.conf), not bypg_hba.confor Docker port directives.Contents
pg-share-fail.compose.yml— PMM's PG left unchanged (binds 127.0.0.1). A client on the bridge getsConnection refused.pg-share-success.compose.yml+run-success.sh— applies a runtime edit (listen_addresses='*'plus a scramhostrule inpg_hba.conf), restarts PG, then the client connects over the bridge and reads realpmm-managedtables.README.md— commands, expected output, and caveats.Notes
percona/pmm-server:3.8.1, pinned toplatform: linux/amd64(no arm64 build yet).pmm-managedrole and allows0.0.0.0/0. Scope the host rule to the bridge subnet and use a dedicated least-privilege role/DB for anything real.