feat(secrets-manager-gke): Page on restart loops and lost LB traffic

Why this MR ?

  • On 2026-10-20 the kubelet killed each newly promoted OpenBao pod for 3 hours, and nothing paged - https://gitlab.com/gitlab-com/gl-infra/production/-/work_items/23296
  • If requests stop reaching the load balancer completely (DNS, TLS certificate, Cloudflare, Gateway), nothing pages today either
  • The generated KubeContainersWaitingInError can't page for a crash loop here: it compares with the Deployment's maxSurge, and kube_deployment_spec_strategy_rollingupdate_max_surge has no series for secrets-manager-gke

What does this MR do ?

  • Add SecretsManagerGkeContainerRestartLoop (s2, pages): the OpenBao app and cloud-sql-proxy containers restarted 3 or more times in 30 minutes, for 5 minutes
  • Deploys and node drains create new pods, so they don't count
  • Add SecretsManagerGkeLoadBalancerTrafficAbsent (s2, pages): the production load balancer reported no requests for 2 hours
  • Route through feature_category: secrets_management, like the Vector alerts, so both alerts keep the env="production" Runway sets
  • Generate them from libsonnet/alerts/secrets-manager-gke-alerts.libsonnet, the same file, group and entry point as !11953, so whichever merges second only joins the two rule lists. The rules filter to production themselves
  • Add promtool unit tests, routing tests and runbook entries
Restart loop backtest

The app part of the expression in mimir-runway, 2026-10-04 to 2026-11-03, 1m step:

  • Production: true once, from 2026-10-20 04:03 for 215 minutes. It would have paged at 04:08, 11 minutes into the outage
  • Staging: never true

Over the 180 days Mimir keeps (2026-05-07 to 2026-11-03) it would have fired 4 times, each on a real failure:

When What happened
2026-05-19 01:47 both pods OOMKilled repeatedly, before the load balancer showed production traffic
2026-06-01 21:36 both pods OOMKilled, 503s on each failover
2026-07-31 ~11:30 liveness kill loop, about 8 minutes with no active pod
2026-10-20 03:58 the incident above

The final expression, with both containers, a sum per env and the max per pod, is true for as many 5-minute steps as the plain sum() version, in each 30-day block of those 180 days.

Every other restart in those 180 days was 1 or 2 within 30 minutes: single liveness kills, a single OOM kill, and both pods once at the same minute on 2026-06-11. Reasons from kube_pod_container_status_last_terminated_reason.

cloud-sql-proxy is a native sidecar, so its restarts are in kube_pod_init_container_status_restarts_total. It restarted 0 times in those 180 days, so adding it doesn't change the backtest.

The load balancer error SLO alert in !12005 (merged) pages only after 45 minutes, so it misses the 2026-06-01 and 2026-07-31 failures. This alert catches both.

Why 2 hours for missing load balancer traffic
  • GCP writes no runway_lb_request_count sample for a minute without requests. When traffic stops, the series goes missing instead of reading 0
  • So the generated SecretsManagerGkeServiceRunwayGkeLbTrafficCessation (== 0) can't fire on a real stop. !12005 (merged) sends SecretsManagerGkeServiceRunwayGkeLbTrafficAbsent to Slack only, because it fired 10 times on quiet nights
  • Production, 2026-05-09 to 2026-11-05: the longest gap without an outage was 95 minutes, on 2026-09-22. absent_over_time(...[2h]) was never true over that range
  • A blackbox probe of https://secrets.gitlab.com would page within minutes. That needs a probe target outside this repository, so it is a follow-up

Run the unit tests with promtool test rules test/mimir-rules/secrets-manager-gke-alerts_test.yml. They are not wired into CI (test/mimir-rules/README.md).

References

Edited by Jayakrishnan Mallissery

Merge request reports

Loading
Loading