Connect from libpq service files and match the real Secret layout

The maintainer's login Secrets carry pg_service.conf ([evolution]),
pgpass and ca.crt. Add a strict read_pg_service (known keys only,
verify-full unless a local socket, bounded size) behind --pg-service in
evo-server and evo-world-clone, mount each login Secret whole in the
store Jobs instead of reading aevolution-db, and fix the migrate Job's
PGSERVICE to the [evolution] section. Record the store node choice,
per-environment databases and the backup plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-29 14:12:26 -04:00
co-authored by Claude Opus 5.5
parent 2d950060db
commit 8d594f28af
12 changed files with 221 additions and 31 deletions
+12 -1
View File
@@ -11,6 +11,9 @@
// stats max_queued=<n> max_tick_debt=<n> commits=<n> store_failures=<n>
// Exit: 0 drained, 2 usage, 3 drain deadline passed, 4 quarantined.
//
// --pg-service <file> (M8.3) takes host, hostaddr, port, database, user and CA from
// the [evolution] section of a libpq service file; anything else in it is refused.
//
// --objects-reserve-mib <n> (M8.3, default 1024) refuses new objects that would leave
// less free space on the object volume: node-local volumes do not enforce their
// requested size. A refused upload is a store failure; nothing is acknowledged.
@@ -129,7 +132,15 @@ std::optional<Options> parse(int argc, char** argv) {
o.pg.user = value;
else if (flag == "--pg-passfile")
o.pg.password_file = value;
else if (flag == "--pg-ca")
else if (flag == "--pg-service") {
// Connection from the [evolution] section of a libpq service file (M8.3);
// the password file stays separate (--pg-passfile).
auto service = persistence::read_pg_service(std::string(value), "evolution");
if (!service)
return std::nullopt;
service->password_file = o.pg.password_file;
o.pg = *service;
} else if (flag == "--pg-ca")
o.pg.ca_file = value;
else if (flag == "--objects")
o.objects = value;