feat(podman): move postgres onto an internal data network #537

Sammanfogat
supernaut sammanfogade 1 incheckning från feat/podman-data-network in i main 2026-10-04 19:29:50 +00:00
Ägare

What

ADR 0042 step 3: Postgres leaves the shared podman network.

  • New Quadlet network bitborg-data, Internal=true, created on the services host only.
  • Postgres joins only bitborg-data.
  • The portal, Forgejo and billing (and billing's migrate container) join both bitborg and bitborg-data.
  • Every other container stays on bitborg. Caddy, Kanidm, the shim, the runner controller and the monitoring agents can no longer reach Postgres.
  • Runbook: a "Podman networks (ADR 0042)" section with the first-apply outage and a verify block with a negative control. The billing table now names both networks.

Naming

The ADR names the tiers edge and data. bitborg stays as the edge tier instead of being renamed. Its name is the unit basename of every container and its subnet feeds both trusted-proxy values, so renaming it is an ADR 0039-sized migration for no isolation gain.

Tested

  • Local podman 6.0.2, two networks, one internal: the dual-homed container reaches both tiers by name. The edge-only container cannot reach the database by name or by IP. The internal-only container has no internet. The dual-homed one does.
  • ansible-playbook site.yml --check --diff --limit bitborg-prod --tags podman,postgres,forgejo,billing,web: changed=6 failed=0. The changes are the new network unit, the Postgres unit plus restart, and the Forgejo and web units. The existing bitborg unit is unchanged. Billing is skipped while disabled.
  • podman_networks per host: prod gets both networks, the monitoring VM only bitborg.
  • --syntax-check, ansible-lint on the five roles, prettier and markdownlint clean.

Apply (operator)

cd ansible
ansible-playbook site.yml --check --diff --limit bitborg-prod --tags podman,postgres,forgejo,billing,web
ansible-playbook site.yml --limit bitborg-prod --tags podman,postgres,forgejo,billing,web

Expect a short database outage between the Postgres restart and the Forgejo and portal restarts in the same play. Then run the runbook's verify block. Caddy must print blocked (expected).

Refs #465.

## What ADR 0042 step 3: Postgres leaves the shared podman network. - New Quadlet network `bitborg-data`, `Internal=true`, created on the services host only. - Postgres joins only `bitborg-data`. - The portal, Forgejo and billing (and billing's migrate container) join both `bitborg` and `bitborg-data`. - Every other container stays on `bitborg`. Caddy, Kanidm, the shim, the runner controller and the monitoring agents can no longer reach Postgres. - Runbook: a "Podman networks (ADR 0042)" section with the first-apply outage and a verify block with a negative control. The billing table now names both networks. ## Naming The ADR names the tiers `edge` and `data`. `bitborg` stays as the edge tier instead of being renamed. Its name is the unit basename of every container and its subnet feeds both trusted-proxy values, so renaming it is an ADR 0039-sized migration for no isolation gain. ## Tested - Local podman 6.0.2, two networks, one internal: the dual-homed container reaches both tiers by name. The edge-only container cannot reach the database by name or by IP. The internal-only container has no internet. The dual-homed one does. - `ansible-playbook site.yml --check --diff --limit bitborg-prod --tags podman,postgres,forgejo,billing,web`: `changed=6 failed=0`. The changes are the new network unit, the Postgres unit plus restart, and the Forgejo and web units. The existing `bitborg` unit is unchanged. Billing is skipped while disabled. - `podman_networks` per host: prod gets both networks, the monitoring VM only `bitborg`. - `--syntax-check`, `ansible-lint` on the five roles, prettier and markdownlint clean. ## Apply (operator) ```bash cd ansible ansible-playbook site.yml --check --diff --limit bitborg-prod --tags podman,postgres,forgejo,billing,web ansible-playbook site.yml --limit bitborg-prod --tags podman,postgres,forgejo,billing,web ``` Expect a short database outage between the Postgres restart and the Forgejo and portal restarts in the same play. Then run the runbook's verify block. Caddy must print `blocked (expected)`. Refs #465.
supernaut lade till 1 incheckning 2026-10-04 19:14:34 +00:00
feat(podman): move postgres onto an internal data network
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m41s
99ae4093eb
Postgres joins only bitborg-data (Internal=true) with the portal, Forgejo and billing, so Caddy and the other edge containers cannot reach it. ADR 0042 step 3. Refs #465.
supernaut sammanfogade incheckning 27dcc6beeb till main 2026-10-04 19:29:50 +00:00
supernaut tog bort grenen feat/podman-data-network 2026-10-04 19:29:50 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!537
Ingen beskrivning angiven.