Skip to content

feat(telemetry): alert on gateway reconcile-error ratio#282

Open
ecv wants to merge 1 commit into
mainfrom
telemetry/gateway-reconcile-alerts-rebased
Open

feat(telemetry): alert on gateway reconcile-error ratio#282
ecv wants to merge 1 commit into
mainfrom
telemetry/gateway-reconcile-alerts-rebased

Conversation

@ecv

@ecv ecv commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Rebase of #218 onto current main (the original was 129 commits behind), plus a one-word anchor fix. Draft for review.

What

Two alerts on the gateway controller's reconcile error ratio, so a controller that can't apply configuration pages operators directly instead of failing silently:

  • GatewayControllerReconcileErrorRatioHigh (warning) — error ratio > 20% for 15m
  • GatewayControllerReconcileErrorRatioCritical (critical) — error ratio > 50% for 10m

Both link a new runbook. In production after v0.23.4 the controller ran at ~83% reconcile failure for hours with nothing firing (cert-listener withholding empties a downstream Gateway's listeners, the CRD rejects it, the controller hot-loops, stale config stays programmed). These would have fired immediately.

Safety

  • Pure telemetry + docs, zero code — no controller/API/RBAC/runtime change; cannot affect the operator or data plane.
  • Purely additive: 3 new files + an alert group appended to the existing gateways.yaml.
  • PromQL is valid — controller is still Named("gateway"); controller_runtime_reconcile_total is standard controller-runtime; no divide-by-zero (the error series is a subset of the total).

Difference from #218

The original's runbook_url anchors had a typo — #gatewaycontrollerreconcileerr**ato**high / ...erratocritical — that didn't match the runbook headers (...ErrorRatioHigh/Critical), so the deep-links broke. Fixed to errorratio* in the alert and both test fixtures.

Verification

  • promtool check rules — SUCCESS (2 rules); promtool test rules — SUCCESS (the CI test-prometheus-rules task auto-globs the fixture).
  • kustomize build config/telemetry/alerts — OK.

Supersedes #218.

Add two alerts on the gateway controller's reconcile error ratio so a
controller that cannot apply configuration pages operators directly
instead of failing silently. In production after v0.23.4 the controller
ran at an ~83% reconcile failure rate for hours with nothing firing;
cert-listener withholding can empty a downstream Gateway's listeners,
which the CRD rejects, so the controller hot-loops and stale config stays
programmed at the edge.

Rebase of #218 onto current main, with the runbook anchor typo
(errorrato -> errorratio) corrected in the alert and test fixtures so the
runbook_url deep-links resolve.

Key changes:
- Append GatewayControllerReconcileErrorRatioHigh (warning, >20% for 15m)
  and GatewayControllerReconcileErrorRatioCritical (critical, >50% for
  10m) to config/telemetry/alerts/gateways.yaml
- Add docs/runbooks/gateway-controller-health.md with impact, diagnosis,
  and remediation for each tier
- Add promtool unit tests covering firing at each threshold, not firing
  below it, and not firing before the for window elapses
@ecv
ecv requested a review from scotwells July 15, 2026 02:58
@ecv
ecv marked this pull request as ready for review July 15, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant