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.
This commit is contained in:
Lance Walters 2026-10-27 00:35:37 -04:00
commit 8939cbdd78
2 changed files with 50 additions and 23 deletions

View file

@ -2,8 +2,17 @@
# one, fed by the Cloudflare tunnel). There is no Cloudflare ingress entry for
# this hostname and there must never be one.
#
# Reachable at http://grafana.lab.internal:8081 over WireGuard:
# Legion /etc/hosts: 10.10.0.2 grafana.lab.internal
# Reachable over WireGuard, and deliberately WITHOUT a Host header mapping:
# phones: http://10.10.0.2:8081/
# laptops: http://grafana.lab.internal:8081/ (10.10.0.2 grafana.lab.internal)
#
# `hostnames` is intentionally ABSENT: a phone sends `Host: 10.10.0.2:8081`,
# which matches no `.lab.internal` hostname, and Envoy answers 404. A route
# with no hostnames matches any Host on the listener, so both URLs work.
# Port 8081 is Grafana's alone — do not attach a second hostname-less route to
# `http-internal`: two bare routes on one listener make precedence ambiguous,
# so any future internal service gets its own listener port.
#
# The listener answers only on 10.10.0.0/24 + the pod CIDR — the host firewall
# (see docs/internal-wireguard-services.md) drops :8081 everywhere else.
apiVersion: gateway.networking.k8s.io/v1
@ -16,8 +25,6 @@ spec:
- name: internal
namespace: internal
sectionName: http-internal
hostnames:
- grafana.lab.internal
rules:
- matches:
- path: