mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-08 21:14:56 +09:00
The DatabaseAutoscalerScaleStuck Pending-intersection term selected kube_pod_status_phase and kube_pod_labels without job="kube-state-metrics", unlike every other selector in this file (the rule's own HPA terms, all of ScaleBlocked, AtMax). Each VMRule runs against a tenant's own vmselect; if that vmselect ever carries a second series for either metric under a different job (a tenant-run KSM alongside federated/remote-written series), the on(namespace,pod) match becomes ambiguous and the whole rule errors out silently while its siblings keep working. Pin the job label on both selectors so the join stays one-to-one. The alerts unittest now asserts the pin on both terms so a revert goes red. Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>