Commit graph homek8s/infrastructure/networking/internal/host-firewall
Author SHA1 Message Date
Lance Walters
930752152e apps(metabase): deploy Metabase (WireGuard-only :8085) with CNPG app DB
- apps/base/metabase: namespace, CNPG Cluster pg (5Gi local-path, siriussec),
  Metabase Deployment v0.65.6.3 (1.5G heap, no PVC), Service, hostname-less
  HTTPRoute on the dedicated metabase Gateway
- infrastructure/networking/internal: new Gateway metabase on port 8085
  (own RouteConfiguration, so it cannot merge with Grafana's bare route)
- host firewall: 8085 in siriussec nft set + rpi ufw guard
2026-11-22 00:32:31 -05: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
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
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
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
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