docs: Grafana persistence + admin-password ownership and recovery path

Records what now persists (sqlite DB on a 5Gi local-path PVC, pinned
GF_SECURITY_SECRET_KEY), that provisioned dashboards still win over UI edits,
that the Secret is only the first-boot seed (the DB owns the password after
that), the reset-admin-password recovery path, and the one-off rollingUpdate
patch the Recreate transition needed.
This commit is contained in:
Lance Walters 2026-10-27 01:04:12 -04:00
commit 53e85ca6e4
3 changed files with 39 additions and 22 deletions

View file

@ -47,7 +47,7 @@ Related: [[WireGuard Mesh]], [[Home Lab Runbook]], [[Pi Reboot Recovery]]
| Node | Hardware | OS / kernel | Arch | LAN | Overlay | Pod CIDR | Roles / labels | Taints | | Node | Hardware | OS / kernel | Arch | LAN | Overlay | Pod CIDR | Roles / labels | Taints |
|---|---|---|---|---|---|---|---|---| |---|---|---|---|---|---|---|---|---|
| `siriussec` | ThinkPad T480 | Arch Linux, `6.18.50-2-lts` | amd64 | `192.168.1.179` (`enp0s31f6`) | `10.10.0.2` (`wg0`) | `10.244.0.0/24` | `control-plane`, `worker`, `gateway=true`, `node-role…/gateway=true`, `exclude-from-external-load-balancers` | **none** | | `siriussec` | ThinkPad T480 | Arch Linux, `6.18.50-2-lts` | amd64 | `192.168.1.179` (`enp0s31f6`) | `10.10.0.2` (`wg0`) | `10.244.0.0/24` | `control-plane`, `worker`, `gateway=true`, `node-role…/gateway=true`, `exclude-from-external-load-balancers` | **none** |
| `rpi` | Raspberry Pi (8 GiB) | Debian 13 trixie, `6.18.39+rpt-rpi-2712` | arm64 | `192.168.1.125` (`eth0`) | `10.10.0.1` (`wg0`), `10.20.0.2` (`wg-remote`) | `10.244.1.0/24` | `worker`, `node-role…/gateway=true`, `node-role…/traffic`, `dedicated=network` | **none** | | `rpi` | Raspberry Pi (8 GiB) | Debian 13 trixie, `6.18.39+rpt-rpi-2712` | arm64 | `192.168.1.125` (`eth0`) | `10.10.0.1` (`wg0`), `10.20.0.2` (`wg-remote`) | `10.244.1.0/24` | `worker`, `node-role…/traffic`, `dedicated=network` (**no** `gateway=true` since 2026-10-27) | **none** |
| `linode` | Linode VPS, Atlanta | Debian 13 trixie, `6.12.113+deb13-amd64` | amd64 | public `50.116.38.217` | `10.10.0.5` (`dummy-k8s`), `10.20.0.1` (`wg0`, hub role) | `10.244.2.0/24` | `dedicated=network` | **none** | | `linode` | Linode VPS, Atlanta | Debian 13 trixie, `6.12.113+deb13-amd64` | amd64 | public `50.116.38.217` | `10.10.0.5` (`dummy-k8s`), `10.20.0.1` (`wg0`, hub role) | `10.244.2.0/24` | `dedicated=network` | **none** |
Node conditions are clean on all three: `Ready=True`, `MemoryPressure/DiskPressure/PIDPressure/NetworkUnavailable=False` *(live)*. Node conditions are clean on all three: `Ready=True`, `MemoryPressure/DiskPressure/PIDPressure/NetworkUnavailable=False` *(live)*.
@ -67,7 +67,7 @@ Node conditions are clean on all three: `Ready=True`, `MemoryPressure/DiskPressu
| `nodeSelector: kubernetes.io/hostname: siriussec` | `forgejo`, `forgejo-runner-amd64`, `local-path-provisioner`, `piedmont-*`, `sirius-growth-*`, `siriusdevops-*`, `cilium-operator` | amd64 images; rpi is arm64, and the PVs live on siriussec's NVMe | | `nodeSelector: kubernetes.io/hostname: siriussec` | `forgejo`, `forgejo-runner-amd64`, `local-path-provisioner`, `piedmont-*`, `sirius-growth-*`, `siriusdevops-*`, `cilium-operator` | amd64 images; rpi is arm64, and the PVs live on siriussec's NVMe |
| `nodeSelector: kubernetes.io/hostname: rpi` | `forgejo-runner-arm64`, `forgejo-runner-deploy-arm64` | needs the Pi's Docker socket and arm64 host | | `nodeSelector: kubernetes.io/hostname: rpi` | `forgejo-runner-arm64`, `forgejo-runner-deploy-arm64` | needs the Pi's Docker socket and arm64 host |
| label `dedicated=network` (on rpi and linode) | none currently — both are labellable targets for future network/light pods | intended for traffic/edge workloads | | label `dedicated=network` (on rpi and linode) | none currently — both are labellable targets for future network/light pods | intended for traffic/edge workloads |
| `node-role.kubernetes.io/gateway=true` (rpi + siriussec; not linode) | `cilium-envoy` DaemonSet | Gateway listeners follow the label | | `node-role.kubernetes.io/gateway=true` (**siriussec only**; rpi lost it 2026-10-27, linode never had it) | `cilium-envoy` DaemonSet | Gateway listeners follow the label. Exactly one node must carry it: a gateway node that does not run the backend pods binds the ports and answers **503 after 5 s** for everything |
Several app Deployments also carry a stray `tolerations: [{key: dedicated, effect: PreferNoSchedule}]` — harmless today because no node has that taint; it is residue from when rpi was tainted. Several app Deployments also carry a stray `tolerations: [{key: dedicated, effect: PreferNoSchedule}]` — harmless today because no node has that taint; it is residue from when rpi was tainted.
@ -228,14 +228,14 @@ The tunnel's ingress list maps **every** public hostname to `http://10.10.0.2:80
| Origin | `Host: siriusdevops.com` | Result | | Origin | `Host: siriusdevops.com` | Result |
|---|---|---| |---|---|---|
| `10.10.0.2:8080` (siriussec) | **200** (and 200 for forgejo) | ✅ production origin | | `10.10.0.2:8080` (siriussec) | **200** (and 200 for forgejo) | ✅ production origin |
| `10.10.0.1:8080` (rpi) | **503 after exactly 5.0 s** | ✗ Envoy running, backend unreachable | | `10.10.0.1:8080` (rpi) | no listener (000 in <1 ms) **since 2026-10-27**; before that, **503 after exactly 5.0 s** | ✗ rpi is not a gateway node any more — no Envoy, no ports |
| `10.10.0.5:8080` (linode) | no listener (000) | ✗ no envoy there | | `10.10.0.5:8080` (linode) | no listener (000) | ✗ no envoy there |
Note that the `Gateway` **status advertises all three addresses** (`10.10.0.1`, `10.10.0.2`, `10.10.0.5`) because the listeners are hostNetwork ports on nodes carrying the gateway label pattern. **Do not treat the Gateway's `status.addresses` as a load-balanced VIP** — it is a list of places the port is bound, and only siriussec's binding can actually complete a request. Note that the `Gateway` **status advertises all three addresses** (`10.10.0.1`, `10.10.0.2`, `10.10.0.5`) even though the label is now on siriussec alone: Cilium fills `status.addresses` with every node InternalIP and ignores `spec.addresses` (cilium#29060). **Do not treat `status.addresses` as a load-balanced VIP or a "try either IP" list** — it is not a list of bound ports either; it is just the node address set. Only `10.10.0.2` has a listener.
### 4.2 The co-location rule ### 4.2 The co-location rule
Envoy runs `hostNetwork` on the gateway-labelled nodes. On rpi it *does* have a listener on `0.0.0.0:8080` (`lib cilium-envoy`), but a request for a mapped hostname **hangs 5 s and returns 503**, because the Envoy on rpi forwards to backend pods that live on siriussec's pod CIDR, sources the connection as `reserved:ingress` (`10.244.1.x`), and the SYN-ACK never completes under Cilium native routing. The measurable signature is the exact **5.000 s** and `503`. Envoy runs `hostNetwork` on the gateway-labelled nodes. **Before 2026-10-27 rpi carried the label too**, so it had a listener on `0.0.0.0:8080` and every request for a mapped hostname **hung 5 s and returned 503** there: the Envoy on rpi forwards to backend pods that live on siriussec's pod CIDR, sources the connection as `reserved:ingress` (`10.244.1.x`), and the SYN-ACK never completes under Cilium native routing. The measurable signature is the exact **5.000 s** and `503`. Fixed by removing the label from rpi (one gateway node, one serving address); the same 5 s/503 signature was making `10.10.0.1:8081`/`:8084` flap for phone clients, and it answered the same way from rpi's own `127.0.0.1`.
Consequences: Consequences:
@ -330,7 +330,7 @@ Neither hostname is in the cloudflared ingress list, and `*.lab.internal` resolv
| 11 | kube-system | `cilium-cz7w6` | siriussec | 10.10.0.2 (host-net) | Cilium agent v1.20.1 | internal | | 11 | kube-system | `cilium-cz7w6` | siriussec | 10.10.0.2 (host-net) | Cilium agent v1.20.1 | internal |
| 12 | kube-system | `cilium-dswfb` | rpi | 10.10.0.1 (host-net) | Cilium agent v1.20.1 | internal | | 12 | kube-system | `cilium-dswfb` | rpi | 10.10.0.1 (host-net) | Cilium agent v1.20.1 | internal |
| 13 | kube-system | `cilium-lst6f` | linode | 10.10.0.5 (host-net) | Cilium agent v1.20.1 | internal | | 13 | kube-system | `cilium-lst6f` | linode | 10.10.0.5 (host-net) | Cilium agent v1.20.1 | internal |
| 14 | kube-system | `cilium-envoy-kfd7w` | rpi | 10.10.0.1 (host-net) | Gateway data plane (listener present, backends unreachable — §4.2) | internal | | 14 | kube-system | ~~`cilium-envoy-kfd7w`~~ | ~~rpi~~ | — | **gone 2026-10-27** — rpi lost `gateway=true`; a gateway node that cannot reach the backends only served 5 s/503 (§4.2) | — |
| 15 | kube-system | `cilium-envoy-q2jn8` | siriussec | 10.10.0.2 (host-net) | Gateway data plane — **the one serving public traffic** | **public** (8080) | | 15 | kube-system | `cilium-envoy-q2jn8` | siriussec | 10.10.0.2 (host-net) | Gateway data plane — **the one serving public traffic** | **public** (8080) |
| 16 | kube-system | `cilium-operator-6fc68c64d6-cw4rj` | siriussec | 10.244.0.2x | Cilium operator (leader election) | internal | | 16 | kube-system | `cilium-operator-6fc68c64d6-cw4rj` | siriussec | 10.244.0.2x | Cilium operator (leader election) | internal |
| 17 | kube-system | `coredns-589f44dc88-l28hh` | siriussec | 10.244.0.109 | cluster DNS (1 of 2) | internal | | 17 | kube-system | `coredns-589f44dc88-l28hh` | siriussec | 10.244.0.109 | cluster DNS (1 of 2) | internal |

View file

@ -1,21 +1,40 @@
# Internal Gateway host firewall # Internal Gateway host firewall
Cilium programs every Gateway listener on **all** nodes carrying Cilium programs every Gateway listener on **all** nodes carrying
`node-role.kubernetes.io/gateway=true` (`rpi` = 10.10.0.1, `siriussec` = `node-role.kubernetes.io/gateway=true` and its Envoy binds
10.10.0.2) and its Envoy binds `0.0.0.0:<listener port>` in the host network `0.0.0.0:<listener port>` in the host network namespace. So
namespace. So `gateway-system/public` on 8080 and `internal/internal` on 8081 `gateway-system/public` on 8080 and `internal/internal` on 8081 are *both*
are *both* listening on the LAN interfaces; the Gateway API object cannot say listening on the LAN interfaces; the Gateway API object cannot say
"WireGuard only". The host firewall is the enforcement point: "WireGuard only". The host firewall is the enforcement point.
**Since 2026-10-27 that label is on `siriussec` (10.10.0.2) only.** rpi used to
carry it as well; its Envoy bound the same ports but could never finish a
request to a backend pod on siriussec (TCP completes, no ACK on
`reserved:ingress`), so `10.10.0.1:8080/:8081/:8084` answered **503 after
exactly 5 s** for everything — even from rpi's own `127.0.0.1`. Clients that
tried either address saw the dashboards flap. One gateway node, one serving
address: `kubectl get nodes -l node-role.kubernetes.io/gateway=true` must return
exactly one node.
| Host | Mechanism | Artifact | | Host | Mechanism | Artifact |
|------|-----------|----------| |------|-----------|----------|
| siriussec (10.10.0.2) | nftables table `inet internal_gw`, loaded by a oneshot unit (same pattern as `k8s-api-firewall.service`) | `siriussec-internal-gw.nft`, `internal-gw-firewall.service` | | siriussec (10.10.0.2) — **load bearing** | nftables table `inet internal_gw`, loaded by a oneshot unit (same pattern as `k8s-api-firewall.service`) | `siriussec-internal-gw.nft`, `internal-gw-firewall.service` |
| rpi (10.10.0.1) | ufw rules inserted above the `allow from 192.168.1.0/24` catch-all | `rpi-ufw-internal-gw.sh` | | rpi (10.10.0.1) — **inert guard** | ufw rules inserted above the `allow from 192.168.1.0/24` catch-all | `rpi-ufw-internal-gw.sh` |
Effective policy for `:8081` (Grafana) and `:8084` (Hubble UI) on both hosts: Effective policy for `:8081` (Grafana) and `:8084` (Hubble UI):
**accept from 10.10.0.0/24 and 10.244.0.0/16, accept on lo, drop everything **accept from 10.10.0.0/24 and 10.244.0.0/16, accept on lo, drop everything
else** (LAN, tailscale, public). Envoy binds every listener on `0.0.0.0`, so a else** (LAN, tailscale, public). Envoy binds every listener on `0.0.0.0`, so a
new internal listener port is a LAN exposure until it is added here. new internal listener port is a LAN exposure until it is added here. The
accept rules carry `counter`s: `nft list table inet internal_gw` shows packets
that reached the host and were allowed, which is the only way to tell "the
firewall accepted it and Envoy answered" from "the client never got there" —
rpi's ufw accept rules read 0 packets while requests to `10.10.0.1:8081` were
in fact reaching Envoy.
Nothing binds these ports on rpi any more, so its ufw rules no longer protect
anything; they are kept so a future `gateway=true` relabel does not silently
expose 8081/8084 on the Pi's LAN address. A stale client pointed at
`10.10.0.1:8081` therefore times out (ufw DROP) instead of being refused.
These are host units, not Flux objects — a node reinstall has to re-apply them. These are host units, not Flux objects — a node reinstall has to re-apply them.
Install: Install:
@ -33,7 +52,8 @@ bash rpi-ufw-internal-gw.sh
Verify: Verify:
```bash ```bash
# siriussec # siriussec — accept counters must be non-zero after a mesh/pod request,
# the drop counter non-zero after a LAN request
nft list table inet internal_gw nft list table inet internal_gw
# rpi # rpi
ufw status | grep -E '8081|8084' ufw status | grep -E '8081|8084'

View file

@ -118,14 +118,11 @@ grafana:
size: 5Gi size: 5Gi
# A single local-path RWO PVC cannot be mounted by old + new pod at once, so a # A single local-path RWO PVC cannot be mounted by old + new pod at once, so a
# rolling update deadlocks (new pod Pending on the volume). Recreate is # rolling update deadlocks (new pod Pending on the volume). Recreate is
# required with persistence enabled. # required with persistence enabled. Note: the live Deployment also carried
# strategy.rollingUpdate from the previous release, which SSA does not drop by
# omission — that took a one-off patch, see docs/grafana-persistence.md.
deploymentStrategy: deploymentStrategy:
type: Recreate type: Recreate
# Explicit null: the pre-existing Deployment carries rollingUpdate settings
# from the previous release and server-side apply will not drop them by
# omission, which fails with "may not be specified when strategy type is
# Recreate". Rendering the null is what removes the stale field.
rollingUpdate: null
# Stable session-signing key. Without this Grafana generates a fresh # Stable session-signing key. Without this Grafana generates a fresh
# secret_key on every boot, so every existing browser cookie becomes # secret_key on every boot, so every existing browser cookie becomes
# "user token not found" and the client bounces on /. The Secret # "user token not found" and the client bounces on /. The Secret