- every count-style stat that can legitimately have no series now ends in
'or vector(0)', so an empty result renders 0 instead of 'No data' (that bit
the Pending-pods stat the moment the one Pending pod went away)
- no grafana_folder annotation: the sidecar's API reload 401s (Grafana's live
admin password is the out-of-band one; the Secret is the first-boot seed), so
the dashboards are imported by Grafana's file provider, which has no
per-dashboard folder option and puts them in General. The annotation described
a path the boards never take.
- validate_panels.py lives next to build.py: reads the panel PromQL out of the
provisioned ConfigMap and queries Prometheus, so 'every panel returns data' is
a command, not a claim. 55/55 targets pass.
Panel validation against the live Prometheus API caught three real faults:
- pod=~"forgejo-runner-.*" also matched the forgejo-runner-prune-* CronJob pods,
which are Completed and permanently not-Ready, so the not-Ready stat read 3.
- CNPG custom-query metrics carry namespace/pod from the scrape, not the
exporter's cluster label, so cluster="pg" matched nothing (empty panels).
- a missing paren in the memory-working-set expression (HTTP 400 from Prometheus).
Also make two legitimately-empty stats render a hard 0 (or vector(0)) instead of
'No data': not-Ready runner pods, and nodes with DiskPressure.
55/55 panel targets now return non-empty results.
Dashboards (uid forgejo-runners, cnpg-postgres, home-lab-workloads) live as
ConfigMaps generated from monitoring/controllers/home/dashboards/build.py and are
loaded by the kube-prometheus-stack grafana sidecar.
Postgres was not scraped at all before this: add a hand-written PodMonitor per
CNPG cluster (release=kube-prometheus-stack, which is what this Prometheus's
podMonitorSelectorNilUsesHelmValues default requires) plus
spec.monitoring.customQueriesConfigMap on both Clusters. enablePodMonitor stays
false — deprecated in CNPG 1.27 and it gives no control over labels.
pg-actions-queries.yaml adds the Forgejo Actions queue/outcome/last_online
metrics that only the forgejo database can answer.
prometheus-node-exporter is no longer pinned to siriussec: the arm64 runner's
jobs are host containers on rpi, so the Pi's root filesystem is the disk that
matters there and kubelet cannot see it.
docs/monitoring-dashboards.md documents the PromQL, the exporter GRANT and the
known unknowns (arm64 per-job breakdown, hostPath PVs have no kubelet volume
stats, single-instance replication, no backups).
Records what 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 reset-admin-password recovery
path, and the one-off rollingUpdate patch the Recreate transition needed.
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.
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.
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.
- 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.
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.
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.
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.
- 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.
§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.
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.
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.
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.
- 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.
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.
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).
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)
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.