Commit graph

84 commits

Author SHA1 Message Date
Lance Walters
b2d63270be docs(internal gateway): the flap was rpi being a second, broken gateway node
503 after exactly 5.000s, including from the Pi own 127.0.0.1 - not a stuck
listener. Envoy config dump shows identical listeners on both nodes, so the
fault was node placement, not config. Label removed from rpi: one gateway node.

Record the three-vantage-point matrix, the nft accept counters, the blackbox
Probe/PrometheusRule and the four negatives.
2026-10-27 01:06:40 -04:00
Lance Walters
53e85ca6e4 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.
2026-10-27 01:04:12 -04:00
Lance Walters
ead60fface internal DNS: lab.internal resolver on the WG hub (dnsmasq on rpi)
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
2026-10-27 01:03:42 -04:00
Lance Walters
48b2b6ac01 internal gateway: single serving address (siriussec only) + a probe that notices when it flaps
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.
2026-10-27 00:57:39 -04:00
Lance Walters
8293df123f grafana: null out rollingUpdate with the Recreate strategy
The existing Deployment still owns strategy.rollingUpdate from the previous
release; omitting it in SSA does not drop it and Helm fails the upgrade.
2026-10-27 00:55:28 -04:00
Lance Walters
f2daebae75 cilium values: point the hubble comment at the real URL (10.10.0.2:8084) 2026-10-27 00:53:37 -04:00
Lance Walters
cc8ce74746 grafana: persist /var/lib/grafana on a 5Gi local-path PVC + pin GF_SECURITY_SECRET_KEY
In-app admin password changes and session state died with every pod because the
sqlite DB was container-local and secret_key regenerated on each boot (clients
bounced on / with 'user token not found'). Recreate strategy is required: a RWO
local-path PVC cannot be mounted by old+new pod during a rolling update.

Secret monitoring/grafana-secret-key is out of band, key secret_key.
2026-10-27 00:53:29 -04:00
Lance Walters
39d707236c docs: Hubble UI on 8084, verified end-to-end by bare IP; correct the 8084 comment
- 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).
2026-10-27 00:51:43 -04:00
Lance Walters
a287dc8dfa hubble: move the UI listener to 8084 — 8082 is taken on rpi
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.
2026-10-27 00:44:36 -04:00
Lance Walters
b4d2738750 docs: bare-IP rule for internal services + the Cilium route-merge and envoy-restart gotchas
Verification log for the Grafana bare-IP fix (10.10.0.2:8081), the 8081
exclusivity proof, the LAN/internet negatives, and the phone-peer state.
2026-10-27 00:40:37 -04:00
Lance Walters
dcb708dff4 hubble: bare-IP UI on its own Gateway (8082) — Cilium merges hostname-less routes
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.
2026-10-27 00:38:47 -04:00
Lance Walters
8939cbdd78 grafana: serve it on the bare WireGuard IP (drop HTTPRoute hostnames)
A phone cannot edit /etc/hosts, so it sends Host: 10.10.0.2:8081, matches no
.lab.internal route and gets a 404 from Envoy. With no hostnames on the route
any Host on the internal listener matches, so http://10.10.0.2:8081/ serves
Grafana and the named URL keeps working. Port 8081 stays Grafana-only; docs now
state the bare-IP rule and the phone-path tests.
2026-10-27 00:35:53 -04:00
Lance Walters
7ca85669b2 hubble: bare-IP listener (8082) for the UI + WireGuard-only firewall on both gateway nodes
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.
2026-10-27 00:35:16 -04:00
Lance Walters
41161d82a1 hubble: relay + UI enabled via cilium values, WG-only UI route, hubble/operator metrics scraped
- 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.
2026-10-27 00:23:05 -04:00
Lance Walters
c04f836371 docs: internal WireGuard-only service pattern (mechanism, firewall, add-next-service, negative tests + verification log)
Also flag clusters/home as not-reconciled: the bootstrapped flux-system
Kustomization reads ./clusters/homek8s, which is why the monitoring entry there
had never been created.
2026-10-27 00:17:45 -04:00
Lance Walters
d3741df619 monitoring: kube-prometheus-stack + WireGuard-only Grafana via the internal gateway
- 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.
2026-10-27 00:12:38 -04:00
Lance Walters
242d76a6d3 node-io: document the io.max layer and the measured before/after 2026-10-26 17:42:09 -04:00
Lance Walters
baac2419e4 docs: record the node-io guard as the etcd/jind io-isolation remedy, with measurements 2026-10-26 17:41:17 -04:00
Lance Walters
2eff85ba04 forgejo-runner-amd64: run the runner as root so a raced dind socket chmod cannot crashloop it 2026-10-26 17:38:04 -04:00
Lance Walters
c66fbd9da1 node-io: match io.max readback on wbps so the guard stops rewriting 2026-10-26 17:12:21 -04:00
Lance Walters
6d9f5176e1 node-io: add io.max layer so dind cannot fill the device queue 2026-10-26 17:10:18 -04:00
Lance Walters
f38f9433b9 node-io: fix guard script path so the writeback limits are actually applied 2026-10-26 16:41:40 -04:00
Lance Walters
c773a3e2a9 node-io: bound the writeback backlog so dind writeback cannot stall etcd 2026-10-26 16:35:03 -04:00
Lance Walters
3cfb89fa2c docs: record the CNPG leader-election fix and its real cause
§9.2 now states the cause as shared-NVMe contention from CI build I/O (etcd
wal_fsync 158 >8.192s / 2,518 >2.048s of 14.81M, worst stall 10.39s, every
stall hour carrying CI I/O) and cites d5d1d28 for the widened window plus the
operator's move into Flux. The static-pod controller-manager/scheduler
restarts and the one CI-unexplained stall hour are called out as open.
Refreshes the live Flux revision, the Kustomization count and the operator pod.
2026-10-26 15:41:35 -04:00
Lance Walters
d5d1d2882a cnpg: widen operator leader-election window + adopt the operator into Flux
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.
2026-10-26 15:38:42 -04:00
Lance Walters
4ababa45eb docs: current-state cluster overview (topology, WireGuard, Garage, workloads) 2026-10-26 15:18:20 -04:00
Lance Walters
bd5057cdfa cilium: widen operator leader-election window for NVMe fsync stalls
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.
2026-10-26 14:48:58 -04:00
4ceaa354f6 Merge pull request 'forgejo: builder prune by --keep-storage, not --filter until' (#11) from feat/prune-keep-storage into master 2026-10-23 04:26:45 +00:00
6db984f3d5 forgejo: builder prune by --keep-storage, not --filter until
The until=72h filter reclaimed 0 B against a 74 GB cache on the Pi's docker
29 daemon (proven by running the prune manually). --keep-storage 20GB
reclaimed 53 GB and leaves a warm cache for the next site/portal build.
Volumes are deliberately never pruned: CI's target/SDK/Gradle volumes are
unused between runs but essential.
2026-10-23 00:28:40 -04:00
fbae77e985 forgejo: give the prune job an hour
Container removal on the Pi measured ~10 min for 48 containers with a ci job
live; 30 minutes would kill the run half-way through the 61 GB image prune.
2026-10-23 00:13:36 -04:00
0d65194686 Merge pull request 'forgejo: give the prune job an hour' (#10) from feat/prune-deadline into master 2026-10-23 04:11:40 +00:00
741b9f13a7 forgejo: let the deploy runner's init container write runner.ini; cap job memory; prune nightly
- init container runs as root: kubelet creates the hostPath /data as root:root
  and the runner image's default user cannot write runner.ini there.
- container.options --memory 3g on both Pi runners: two concurrent jobs must not
  take the 8 GiB Pi (already using swap) to OOM. Caps the job container only.
- forgejo-runner-prune CronJob: exited containers >48h, images >168h, builder
  cache >72h, so the single 917G / volume stops climbing.
2026-10-22 23:55:21 -04:00
284f1d5e1e Merge pull request 'forgejo: fix deploy runner registration, cap job memory, prune nightly' (#9) from feat/deploy-runner-fixes into master 2026-10-23 03:53:32 +00:00
1576240941 forgejo: dedicated deploy-arm64 runner so CI cannot starve site deploys
deploy-site.yml must run on the Pi (127.0.0.1:5000 registry, Garage on host
network, host docker socket) but the Pi's only runner also serves every
runs-on: docker job in the instance. An onionwire Rust ci build therefore held
the single docker slot while the sirius-growth deploy sat in 'waiting'.

Adds a second runner instance on rpi declaring only the deploy-arm64 label,
with its own hostPath-backed registration (/opt/siriusdevops/runner-deploy/data)
so a pod restart reuses it instead of burning a single-use runner token.
2026-10-22 23:52:54 -04:00
76ab5b9cd6 Merge pull request 'forgejo: dedicated deploy-arm64 runner so CI cannot starve site deploys' (#8) from feat/runner-deploy-arm64 into master 2026-10-23 03:51:17 +00:00
Lance
45951c6200 siriusdevops: add a scoped CI deployer ServiceAccount
The site repo's CI used to ssh to the Pi and run docker there. It now rolls the
k8s Deployments through the API, so it needs an identity limited to
get/list/patch on deployments in this namespace (same pattern as sirius-growth).
2026-10-20 10:06:51 -04:00
Lance
237722b581 ingress: move public apps off the retired linode node onto siriussec
Linode VPSs are shut down. The Gateway listener has to be co-located with the
backend pods (hostNetwork Envoy returns 503 for cross-node backends), so all
public workloads now schedule on siriussec and the tunnel origin points there.

- nodeSelector linode -> siriussec (piedmont, sirius-growth, siriusdevops)
- siriusdevops site/contact now pull rebuilt images from the Forgejo registry
  (the old :dev tags existed only on the dead VPS containerd)
2026-10-20 09:01:24 -04:00
55342db125 Merge pull request #7: sirius-growth: run the CI image for the portal 2026-10-19 07:45:50 +00:00
devops
77d658b719 sirius-growth: portal image from CI tag latest, drop hand-pushed digest pin 2026-10-19 03:47:28 -04:00
bba13eefcb Merge pull request #6: sirius-growth: deploy the portal API on the existing hostname 2026-10-19 07:28:13 +00:00
Lance Walters
90355d4a76 sirius-growth: deploy the portal API on the existing hostname
FastAPI portal on 8091 behind /api/portal, image pinned to the API
commit 406f25c and its manifest digest. Route sits after /api/contact
and before the catch-all. Env comes from the sirius-growth-portal-app
Secret (DB URL, session secret, admin creds, Garage S3 keys); nothing
secret is in git.
2026-10-19 03:30:03 -04:00
36419c8fae Merge pull request #5: sirius-growth: add CNPG Cluster 'portal' 2026-10-19 07:01:21 +00:00
Sirius DevOps
73cc883d5e sirius-growth: add CNPG Cluster 'portal' (1 instance, 5Gi local-path on siriussec)
Database only. Bootstraps database/owner 'portal' from the
sirius-growth-portal-db basic-auth Secret. No API or route changes.
2026-10-19 03:03:09 -04:00
03acdf2841 Merge pull request 'sirius-growth: declare the CI deployer ServiceAccount' (#4) from feat/sirius-growth-deployer into master 2026-10-19 04:42:57 +00:00
Sirius DevOps
bb1ace7041 sirius-growth: declare the CI deployer ServiceAccount
The site repo's CI rolls the Deployment after pushing a new image, using a
kubeconfig stored as a repo secret. The token came from a ServiceAccount that
only existed because it was created by hand; declare it so a cluster rebuild
does not silently break deploys. Namespace-scoped, deployments only,
get/list/patch.
2026-10-19 00:44:48 -04:00
Lance Walters
5854f5a38b feat(sirius-growth): route /api/contact ahead of the page
Same shape as piedmont. The contact Deployment uses the new image.
2026-10-18 16:00:10 -04:00
Lance Walters
562343c33c feat(sirius-growth): route siriusgrowthsolutions.com to the site
No Cloudflare change in this commit. Origin must answer 200 before the tunnel is updated.
2026-10-18 15:26:00 -04:00
b7cedab548 feat(sirius-growth): deploy the static site on linode
No public hostname. Photos stay unwired: Garage website listener is loopback-only.
2026-10-18 06:51:41 +00:00
Lance Walters
5a98fd620f feat(sirius-growth): deploy the static site on linode
No HTTPRoute: no public hostname has been named. Photos stay on the
Pi Garage listener, which is loopback-only.
2026-10-18 02:52:08 -04:00
c736dfd108 feat(piedmont): route /api/contact to piedmont-contact
Merge pull request #2
2026-10-01 03:48:46 +00:00