internal gateway probe: alert when the gateway label is not on exactly one node

The probe catches the symptom; this catches the cause. kube-state-metrics
exposes role labels as kube_node_role, so no extra scrape target is needed.
This commit is contained in:
Lance Walters 2026-10-27 01:08:53 -04:00
commit 5c7fbfefa8

View file

@ -148,6 +148,26 @@ spec:
on siriussec, that the internal_gw nft table accepts 10.10.0.0/24
and 10.244.0.0/16, and that the route/service behind the listener
exists.
# The exact regression this card fixed: rpi re-acquiring the gateway
# label adds a second Envoy that answers 5 s/503s for everything it is
# asked. kube-state-metrics exposes role labels as kube_node_role, so
# this needs no extra probe target (`kube_node_labels` is not exposed
# with the stack's default metric allowlist).
- alert: GatewayNodeCountNotOne
expr: count(kube_node_role{role="gateway"}) != 1
for: 5m
labels:
severity: warning
annotations:
summary: >-
{{ $value }} nodes carry node-role.kubernetes.io/gateway=true
(expected exactly 1 — siriussec)
description: >-
Every gateway-labelled node runs cilium-envoy and binds 8080/8081/
8084. A node that does not also run the backend pods answers 503
after exactly 5 s for everything (that is how 10.10.0.1 made the
internal dashboards flap). Remove the label:
kubectl label node <node> node-role.kubernetes.io/gateway-
- alert: InternalGatewayProbeMissing
expr: absent(probe_success{job="internal-gateway"})
for: 10m