homek8s/infrastructure/networking/cilium/hubble-ui-httproute.yaml
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

27 lines
876 B
YAML

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: hubble-ui
namespace: kube-system
labels:
app.kubernetes.io/name: hubble-ui
app.kubernetes.io/part-of: cilium
spec:
parentRefs:
# Dedicated listener on port 8082 — deliberately NOT the shared 8081
# listener. There is no `hostnames` field here on purpose: the route must
# match a request whose Host header is the bare IP (10.10.0.2:8082), which
# is the only form a phone can use. A hostname-less route has to own its
# listener, hence the separate port.
- name: internal
namespace: internal
sectionName: hubble-ui
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
# hubble-ui Service (frontend nginx, which proxies /api to the backend)
- name: hubble-ui
port: 80