infrastructure(garage): config in git, WG-only proven, per-consumer keys, egress policy, backup, metrics #16
1 changed files with 14 additions and 10 deletions
docs(cluster-overview): Garage ports, firewall, keys, backup after the hardening pass
commit
c9ec270c22
|
|
@ -296,16 +296,20 @@ Neither hostname is in the cloudflared ingress list, and `*.lab.internal` resolv
|
|||
|
||||
| Property | Value |
|
||||
|---|---|
|
||||
| Where | **Docker container on `rpi`**, not in Kubernetes — image `dxflrs/garage:v1.1.0`, container `garage`, up 7 days |
|
||||
| Compose | `/home/sirius/websites/garage/` (not under `/opt`) |
|
||||
| State | `data/` (bind → `/data/data`) and `meta/` (bind → `/data/meta`); config `garage.toml` → `/etc/garage.toml` |
|
||||
| Ports | `127.0.0.1:3900` S3 API, `127.0.0.1:3901` RPC, `127.0.0.1:3902` web/static — **plus `10.10.0.1:3900` on the WireGuard hub address** |
|
||||
| Capacity | 100 GB configured; `401.3 GB (40.8%)` data available (single healthy node `d053db4dfc97bf78`) |
|
||||
| Buckets | `sirius-growth-photos`, `piedmont-photos`, `sirius-growth-client-files` |
|
||||
| Where | **Docker container on `rpi`**, not in Kubernetes — image `dxflrs/garage:v1.1.0`, container `garage` |
|
||||
| Compose | **`infrastructure/garage/` in this repo** (installed to `/etc/garage/docker-compose.yml`); state stays at `/home/sirius/websites/garage/`. Flux does not apply it — see that directory's README |
|
||||
| State | `data/` (bind → `/data/data`) and `meta/` (bind → `/data/meta`); config `/etc/garage/garage.toml`, RPC secret `/etc/garage/garage.env` (0600, not in git) |
|
||||
| Ports | `10.10.0.1:3900` S3 API and `10.10.0.1:3903` metrics (WireGuard only), `127.0.0.1:3900` host-local. No `0.0.0.0` publish. 3901 (RPC) and 3902 (`[s3_web]`) are no longer published at all |
|
||||
| Firewall | `host/garage-firewall.nft` — nftables PREROUTING priority -140 drop for 3900-3903 from anything but `lo`/`wg0`/`wg-remote`. Docker's DNAT bypasses ufw's INPUT chain, so ufw alone cannot stop a compose typo |
|
||||
| Capacity | 100 GB configured; `354.3 GB (36.0%)` data available (single healthy node `d053db4dfc97bf78`) |
|
||||
| Buckets | `sirius-growth-photos`, `piedmont-photos`, `siriusdevops-media`, `sirius-growth-blog-media`, `sirius-growth-client-files` |
|
||||
| Keys | one per consumer — `ci-push` (W only) and `site-fetch` (R only) on `siriusdevops-media`; the shared `ci-key` was deleted 2026-11-19 |
|
||||
| Backup | hourly `meta` snapshot + nightly `data` rsync to `[email protected]:/root/garage-backup` (systemd timers) |
|
||||
| Metrics | Prometheus target `job="garage"` scraping `10.10.0.1:3903`, `monitoring/controllers/home/garage.yaml` |
|
||||
|
||||
**Correcting a carried-over claim:** Garage is **not** loopback-only. Three of its four published ports are loopback-bound, but the S3 API at `:3900` is *also* published on `10.10.0.1`, the Pi's WireGuard address. A pod on siriussec can therefore reach Garage's S3 API at `http://10.10.0.1:3900` over the mesh — but **not** the website port, which is `127.0.0.1:3902` only.
|
||||
**Exposure model:** every published port binds an explicit address, and the host firewall drops the rest before Docker can rewrite the packet. A pod on siriussec reaches the S3 API at `http://10.10.0.1:3900` over the mesh; the LAN and the internet see nothing (measured off-mesh from the Linode node: all of 3900-3903 filtered).
|
||||
|
||||
**What breaks:** anything that assumes `127.0.0.1:3902` (the static web endpoint) is reachable from inside the pod network. It is not — a pod's `127.0.0.1` is its own netns. Kubernetes workloads must use the `10.10.0.1:3900` S3 endpoint, or the in-image `/photos/` alias baked into the site images as a fallback. That alias is a deliberate fallback, **not** evidence the bucket is gone.
|
||||
**What breaks:** anything that assumes `127.0.0.1:3902` (the removed static web endpoint) is reachable from inside the pod network. It never was — a pod's `127.0.0.1` is its own netns — and the listener is now gone. Kubernetes workloads must use the `10.10.0.1:3900` S3 endpoint, or the in-image `/photos/` alias baked into the site images as a fallback. That alias is a deliberate fallback, **not** evidence the bucket is gone.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -524,7 +528,7 @@ Host disks *(live)*: siriussec `/` 214 G, 141 G used (**70%**, 62 G free); rpi `
|
|||
| `linode` tainted `dedicated=network:PreferNoSchedule` | label present, **no taint** (same for rpi) |
|
||||
| Public origin `10.10.0.5:8080` in the older paragraph | origin is **`10.10.0.2:8080`** (the skill's newer paragraph is right; the older one is stale) |
|
||||
| Gateway listener on `10.10.0.5` / one Gateway | Gateway `public` advertises **three** addresses (`.1/.2/.5`) but only `.2:8080` completes requests; a second Gateway `internal:8081` exists |
|
||||
| Garage: systemd unit, loopback only | **Docker container** `dxflrs/garage:v1.1.0`; loopback on `3900-3902` **plus `10.10.0.1:3900`** (S3 is reachable from pods) |
|
||||
| Garage: systemd unit, loopback only | **Docker container** `dxflrs/garage:v1.1.0`; `10.10.0.1:3900` (S3) + `10.10.0.1:3903` (metrics) + `127.0.0.1:3900`, nothing on `0.0.0.0`; compose now committed at `infrastructure/garage/` |
|
||||
| wgportal is the peer manager on the Pi | **wgportal is not running** — dir + compose remain, no container, no unit; peers are edited manually |
|
||||
| "Only wgportal compose should stay on the Pi" | Pi also runs `registry`, `handyman-site`, `sirius-growth-site` containers |
|
||||
| PHS/piedmont pods pinned to `linode` | pinned to **siriussec** (`nodeSelector: kubernetes.io/hostname`) |
|
||||
|
|
@ -565,7 +569,7 @@ All times 2026-10-26 UTC. `kubeconfig` on the Legion admin laptop → `https://1
|
|||
| 23 | Cloudflare API `GET /accounts/…/cfd_tunnel` | `sirius home` healthy, 4 connections; `piedmontomesvc` tunnel inactive, 0 |
|
||||
| 24 | rpi: `docker ps -a` | garage, registry, handyman-site, sirius-growth-site up; **no wg-portal**; 5 exited `onionwire-ci-*` containers |
|
||||
| 25 | rpi: `docker exec garage /garage status` and `bucket list` | node `d053db4dfc97bf78` healthy, 3 buckets |
|
||||
| 26 | rpi: `ss -ltnp \| grep 390` | `127.0.0.1:3900-3902` **and `10.10.0.1:3900`** |
|
||||
| 26 | rpi: `ss -ltnp \| grep 390` | `127.0.0.1:3900` **and `10.10.0.1:3900`/`:3903`** — no `0.0.0.0`, no 3901/3902 |
|
||||
| 27 | rpi: `df -h`, `free -h`, `vcgencmd get_throttled` | 58% used; 7.9 GiB RAM; `throttled=0x0` |
|
||||
| 28 | siriussec: `wg show` | peer = Pi hub, `AllowedIPs 10.10.0.0/24, 10.244.0.0/16`, handshake 1 min |
|
||||
| 29 | siriussec: `sudo nft list table inet k8s-api` | lo / wg0 / `10.244.0.0/16` accept, else drop |
|
||||
|
|
|
|||
Loading…
Reference in a new issue