sirius-growth/portal had a 24h-RPO pg_dump and no way to roll forward. This adds
continuous WAL archiving + a daily base backup into a second, independent Garage
node on the Linode (bucket pg-wal-archive, 10.10.0.5:3900, WireGuard-only), and
proves a restore to a point in time end to end.
- infrastructure/garage-linode/: podman+quadlet unit (the Linode is a kubelet
node, no docker), garage.toml bound to 10.10.0.5 only, nft guard in PREROUTING
-140, install.sh, README with the measured disk sizing, pitr-restore.md with
the rehearsal transcript.
- apps/base/sirius-growth/cluster.yaml: spec.backup.barmanObjectStore
(destinationPath s3://pg-wal-archive, gzip WAL+data, retentionPolicy 14d),
credentials from Secret sirius-growth/portal-wal-s3 (out of band, not in git).
- apps/base/sirius-growth/scheduled-backup.yaml: ScheduledBackup portal-daily,
03:20 UTC, six-field cron.
- docs/cluster-overview.md: §5.1 the WAL store, §8.1 coverage + sizing + gaps,
§8.3 the PITR restore recipe.
forgejo/pg is deliberately left on pg_dump only (a day of git history is
annoying, not costly); portal keeps its nightly dump as the logical second copy.
Rehearsed 2026-11-19: marker row at 22:35:06Z, unwanted row at 22:35:28Z,
throwaway cluster restored to targetTime 22:35:15Z came back with the marker and
without the later row. See infrastructure/garage-linode/pitr-restore.md.
Four pieces of state were still only on the machine they run on. All four now
land on the Linode over the WireGuard mesh, in the same /root/cluster-backup
tree (or /root/pihost-backup for the Pi) with the same manifest/sha256 habit:
* monitoring/kube-prometheus-stack-grafana — new CronJob `monitoring/grafana-backup`.
The image is -distroless (no shell), so this mounts the PVC read-write and
takes a consistent copy with the sqlite backup API (PRAGMA integrity_check on
the copy), then streams it: grafana/grafana-<stamp>.db, keep 14.
* osint/osint-db — plain Postgres Deployment, so neither the CNPG primary lookup
nor CNPG_TARGETS reaches it. `forgejo/cluster-backup` gains a PG_TARGETS loop
that pg_dump -Fc's inside the pod using its own POSTGRES_USER/POSTGRES_DB
(exec-only RBAC in apps/base/osint/), sha256 checked on both sides.
* sirius-growth/sgs-leadgen-data — new CronJob `sirius-growth/leadgen-backup`,
link-dest snapshot mirror, keep 7.
* Pi /etc/wireguard + wgportal sqlite — infrastructure/wireguard/backup/,
nightly systemd timer -> [email protected]:/root/pihost-backup, keep 14.
Each tree carries its own retention, so adding artifacts cannot crowd the
Linode. Docs §8/§8.1/§8.2 record coverage, the accepted gaps (Prometheus TSDB,
camera frames, runner scratch) and the restore procedure — including the
TimescaleDB pre/post-restore calls osint needs.
Garage was the only piece of the platform in no git repository and reachable
from more than WireGuard. This is a hardening/ownership pass, not a migration —
the container stays on the Pi.
- infrastructure/garage/: docker-compose.yml (pinned dxflrs/garage:v1.1.0,
every publish on an explicit 10.10.0.1 / 127.0.0.1 address, no 0.0.0.0),
garage.toml (rpc_secret moved to /etc/garage/garage.env, [s3_web]/3902
removed, admin API on 3903 for metrics), README (apply, state, restore,
keys, backup, metrics) and an explicit note that Flux does not apply it.
- host/garage-firewall.nft: PREROUTING priority -140 drop of 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 from publishing S3 on the LAN.
Measured: a 0.0.0.0:3902 publish stayed unreachable from the LAN and the
drop counter incremented.
- backup/: garage-backup.sh meta|data + systemd timers (meta hourly, data
nightly) rsyncing to [email protected]:/root/garage-backup over wg-remote.
Nothing else backs up Forgejo or the PG PVCs; that stays uncovered.
- monitoring/controllers/home/garage.yaml: Service + EndpointSlice +
ServiceMonitor for 10.10.0.1:3903 and five alerts. Target is UP.
- apps/base/siriusdevops/networkpolicy-site-egress.yaml: first policy in the
namespace. CiliumNetworkPolicy, not a k8s NetworkPolicy: 10.10.0.1 is a
cluster node (reserved:remote-node), so ipBlock 10.10.0.1/32 is inert.
Egress whitelist = TCP 3900 to a node + cluster DNS; measured 403 on 3900,
timeouts on 3900-adjacent 5000/3903, on 10.10.0.2:8080 and on the internet.
Keys: ci-push (W only, siriusdevops-media) and site-fetch (R only, same
bucket) replace the shared ci-key, which is deleted. The k8s Secret and the
two Forgejo repo secrets were repointed. No key material is in this commit.
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.
WireGuard clients apply the tunnel DNS to the whole device, so the hub
resolver answers lab.internal authoritatively and forwards everything else:
- dnsmasq on rpi, bound to lo/wg0/wg-remote only, 10.10.0.1 + 10.20.0.2
- grafana.lab.internal, hubble.lab.internal -> 10.10.0.2 (hosts file, one
line per record)
- ufw: 53 allowed from 10.10.0.0/24, 10.20.0.0/24, 10.244.0.0/16; dropped
everywhere else, inserted above the LAN catch-all
- docs: zone, per-client instructions (phone is a linode-hub spoke), rollback
rpi carried node-role.kubernetes.io/gateway=true, so cilium-envoy bound 8080/8081/8084
there too. Its Envoy completes TCP to a backend pod on siriussec but never finishes
the request: every hit on 10.10.0.1:8081/8084 hung 5s and returned 503, even from the
Pi own 127.0.0.1, while 10.10.0.2 answered in ms. Clients that tried either address
saw the dashboards flap. Remove the label from rpi: one gateway node, one address.
The Gateway status.addresses still lists every node InternalIP (cilium#29060 ignores
spec.addresses) - it is not a VIP; only 10.10.0.2 serves.
Add blackbox-exporter + Probe (8081, 8084 every 30s) + PrometheusRule alerts so a
regression is visible in the stack instead of on a phone. Give the internal_gw nft
accept rules counters so an allowed request is provable.
- internal-wireguard-services §10: Hubble verification log (HR Ready, rendered
hubble.metrics list, relay connected to all 3 agents, 23/23 scrape targets up,
flow/drop/TCP/ICMP/PolicyVerdict counters non-zero, headless-browser service
map with 64.7 flows/s and 3/3 nodes, LAN + internet negatives, regression).
Records the port cycle: 8082 is held on rpi by the leftover handyman-site
Docker container (and 8083 by its nginx), so the listener must be checked free
on EVERY cilium-envoy node, and notes that only 10.10.0.2 answers (Envoy on a
node without the backend 503s after 5s).
- gateway-hubble-ui.yaml: stop asserting a bind error for 8084 — 8084 was
verified free on both nodes and binds; the comment now explains the rule
without claiming a false fact.
- cluster-overview: internal gateway section + namespaces (monitoring, hubble
pods, the second gateway).
Cilium binds every Gateway listener on 0.0.0.0 on EVERY gateway node, and the Pi
still runs leftover Docker site containers: handyman-site holds 127.0.0.1:8082
and its nginx holds 127.0.0.1:8083 (a 127.0.0.1 bind still blocks a 0.0.0.0
one). Binding 8082 there made xDS reject the listener on rpi
("cannot bind '0.0.0.0:8082': Address already in use" at ~2/s) and restarted
cilium-envoy on the node that fronts the public ingress — the UI worked or not
depending on which node answered.
8084 measured free on both gateway nodes (rpi, siriussec) before the change.
Firewall moved with it: siriussec nft dport set { 8081, 8084 }, rpi ufw trio for
8084 inserted above the LAN catch-all and the 8082 rules deleted.
URL: http://10.10.0.2:8084/ (bare IP, no /etc/hosts) — same as Grafana on 8081.
Cilium 1.20 renders ONE RouteConfiguration per Gateway, shared by every listener
of that Gateway. Two routes that both match `Prefix: /` with no hostnames are
merged into a single route with `weightedClusters` 1/1, so a second bare-IP
route on the `internal` gateway (even on a second port) makes BOTH services
random: measured 12 requests each to :8081 and :8082 returning Grafana 7x and
Hubble UI 5x. Splitting by port does not help.
Hubble UI therefore gets its own Gateway (`internal/hubble-ui`, listener
http-internal on 8082, own RouteConfiguration) and its route has no hostnames,
so `http://10.10.0.2:8082/` and `http://hubble.lab.internal:8082/` both serve the
UI while Grafana keeps :8081 to itself. Documented as the rule in gateway.yaml:
one bare-IP service per Gateway.
Operator addendum: internal services must be reachable by bare IP+port, because
a phone cannot edit /etc/hosts. A hostname-scoped route does not match
`Host: 10.10.0.2:8081` (Envoy 404), and a hostname-less `PathPrefix /` cannot
share a listener with it — so hubble-ui gets its own listener (`hubble-ui`, port
8082) with a route that sets no hostnames. http://10.10.0.2:8082/ and
http://hubble.lab.internal:8082/ both hit the UI.
Firewall: siriussec nft table now matches `dport { 8081, 8082 }` and starts with
`destroy table` so re-running the unit replaces (not appends) the rules; the rpi
ufw script is generalised to a PORTS list and inserts each port above the LAN
catch-all. Both hosts applied and verified before the listener was programmed.
docs: internal gateway section, host-firewall README.
- values: hubble.relay.enabled + hubble.ui.enabled (1 replica each, pinned to
siriussec, modest requests/limits), hubble.metrics list (flow/drop/tcp/
port-distribution/icmp/httpV2/dns) + ServiceMonitors labelled
release=kube-prometheus-stack for agent, relay and operator (:9963).
prometheus.serviceMonitor.trustCRDsExist because the CRDs come from the
separate monitoring release.
- hubble.metrics.dashboards: chart's Hubble dashboards into Grafana via the
grafana_dashboard sidecar label.
- HTTPRoute hubble-ui in kube-system on Gateway internal/internal#http-internal
(port 8081) for hostname hubble.lab.internal. No public hostname, no tunnel
ingress entry; the host firewall on 8081 is the boundary.
- clusters/homek8s/monitoring.yaml: the 'monitoring' Flux Kustomization was
declared only under clusters/home, which the bootstrapped flux-system
Kustomization never reads (its path is ./clusters/homek8s), so it had never
been created. Declare it in the tree that actually reconciles.
- monitoring/controllers/home: HelmRepository + HelmRelease (chart pinned
92.14.0), values.yaml via configMapGenerator, Grafana admin from the
monitoring/grafana-admin Secret (out of band, never in git).
- Everything pinned to siriussec, Prometheus on a 10Gi local-path PVC with
7d AND 8GB retention caps; alertmanager off; no remote write.
- internal gateway listener now accepts routes from any namespace; the security
boundary is the host firewall, not the namespace.
- host-firewall/: nft table + oneshot unit for siriussec and the ufw script for
rpi that close :8081 to everything but 10.10.0.0/24 and 10.244.0.0/16.
Shared-NVMe contention on the T480, not a uniformly slow disk: etcd WAL fsync
has 158 samples >8.192s over 41d while 99.9% land <=32ms, and all 8 hours with
>=2s stalls have CI build I/O on the same PM991 NVMe (worst single stall
10.39s, dind data-root and forgejo-data share /dev/nvme0n1p3 with the WAL).
Each stall blows the operator's 5s lease-renewal HTTP timeout and
controller-runtime fatals with "leader election lost" (223 restarts in 45d).
Lease 60s / renew 45s rides out a 10.4s stall instead of restarting the
operator; safe at replicas: 1, there is no second holder to split-brain
against. CNPG's flags are integer seconds and it has no resource-lock-timeout
flag, unlike the Cilium operator.
The operator was installed by hand, so a kubectl patch would be lost on the
next reinstall. Vendor the pinned 1.30.0 release manifest under
infrastructure/databases/base and own it with its own Flux Kustomization
(prune: false -- the bundle carries the 11 CNPG CRDs, and pruning those would
delete every Cluster). The patch also declares the pre-existing live deltas
that upstream does not ship: the overlay API env (10.10.0.2:6443), the
500m/512Mi limits and the 3min startup probe -- adopting upstream raw would
have silently reverted all three.
Single-node etcd on the T480's PM991 NVMe shows WAL fsync spikes >8s under
dind build I/O. apiserver stalls then blow the operator's 5s lease-renewal
HTTP timeout and it fatals with 'Leader election lost, shutting down'
(204 restarts in 41d). Lease 60s / renew 45s / lock timeout 20s rides out
a stall instead of restarting the operator.
Clients outside the cluster (WireGuard spokes: phone, SG VPS, laptop) could
reach node IPs, the API server and pod IPs but not ClusterIPs: Cilium
swallowed the service packets on the hub before any route applied, because
bpf-lb-external-clusterip defaulted to false.
Set bpf.lbExternalClusterIP: true so the HelmRelease renders
bpf-lb-external-clusterip=true.
Cilium 1.20.1's operator refuses to create the Gateway controller when a
required CRD lacks v1:
CRD "referencegrants.gateway.networking.k8s.io" does not have version "v1"
The cluster's Gateway API CRDs predate v1.5.x and only serve referencegrants
v1beta1. Vendor the v1.5.1 standard channel (referencegrants, tlsroutes,
backendtlspolicies, grpcroutes, listenersets etc. all at v1) and manage it
with a dedicated Flux Kustomization with prune=false so CRDs are never
auto-deleted.
gatewayAPI.hostNetwork.nodes.matchLabels was 'gateway: "true"' (matches
siriussec only), while envoy.nodeSelector is
'node-role.kubernetes.io/gateway: "true"' (matches linode only). The
Gateway listener was scheduled for host-network on a node where Envoy
does not run, so no 8080 listener was ever programmed and the public
Gateway had no dataplane on linode.
Align the hostNetwork selector to the Envoy's actual node label so the
listener binds on linode.
Cilium 1.19.x operator unconditionally registers a field indexer for
TLSRoute/v1alpha2 and treats the error as fatal. The cluster's TLSRoute
CRD (standard channel from Gateway API v1.5.x) marks v1alpha2 as not
served. Cilium 1.20+ (PR #45251) fixed the indexer to not require
v1alpha2 served. Chart bump: 1.19.7 -> 1.20.1.
Wires ../networking/cilium (HelmRelease + HelmRepository + values
ConfigMap) into the infrastructure kustomization so Flux deploys
Cilium 1.19.7 and upgrades the crashing 1.18.13 operator.
Add a second Gateway listening on port 8081, namespace-scoped to
`internal`. Only HTTPRoutes in the `internal` namespace can attach,
so grafana and other private services are not reachable from public
HTTPRoutes.
The listener is on the WG overlay (siriussec 10.10.0.2 + linode
10.10.0.5, both `gateway=true`). No public IP, no LAN route — only
peers on 10.10.0.0/24 can reach it.
Also wires the new `internal` gateway into Flux via
infrastructure/home/kustomization.yaml.
Cilium operator 1.18.13 crashes on startup with:
no matches for kind TLSRoute in version gateway.networking.k8s.io/v1alpha2
The TLSRoute CRD on the cluster only has v1 (no v1alpha2). Cilium 1.19+
fixes the gateway API field indexer to work with the v1/v1alpha3 TLSRoute
layout. Fixes the 3-day operator outage.
Cilium Envoy cannot reach overlay backends on another node
(503 cx_connect_fail). Same-node listener next to workloads works;
cloudflared origins point at the T480 LAN:8080.
Operator is installed on-cluster; DB restored from Pi dump; repo data
rsynced onto local-path PVC. HTTPRoute kept for Gateway; public origin
is NodePort until Cilium hostNetwork Envoy can reach overlay backends.