From 17b25c4429284b9ea9f8b9bccc1cf06f08649453 Mon Sep 17 00:00:00 2001 From: jenkins Date: Tue, 4 Aug 2026 12:24:38 -0300 Subject: [PATCH] monitoring: reload vmalert rules automatically --- scripts/tests/test_monitoring_query_capacity.py | 13 +++++++++++++ services/monitoring/vmalert-atlas-availability.yaml | 1 + 2 files changed, 14 insertions(+) diff --git a/scripts/tests/test_monitoring_query_capacity.py b/scripts/tests/test_monitoring_query_capacity.py index afd44a720..8b33e68c0 100644 --- a/scripts/tests/test_monitoring_query_capacity.py +++ b/scripts/tests/test_monitoring_query_capacity.py @@ -57,3 +57,16 @@ def test_quality_rollups_do_not_run_every_minute() -> None: quality = yaml.safe_load(manifest["data"]["platform-quality.yaml"])["groups"][0] assert quality["interval"] == "5m" + + +def test_vmalert_reloads_updated_rule_files() -> None: + """Make Flux ConfigMap updates take effect without manual pod revision bumps.""" + manifests = _documents( + REPO_ROOT / "services/monitoring/vmalert-atlas-availability.yaml" + ) + deployment = next( + manifest for manifest in manifests if manifest.get("kind") == "Deployment" + ) + args = deployment["spec"]["template"]["spec"]["containers"][0]["args"] + + assert "-configCheckInterval=30s" in args diff --git a/services/monitoring/vmalert-atlas-availability.yaml b/services/monitoring/vmalert-atlas-availability.yaml index d1738fc1a..d387fa0b4 100644 --- a/services/monitoring/vmalert-atlas-availability.yaml +++ b/services/monitoring/vmalert-atlas-availability.yaml @@ -316,6 +316,7 @@ spec: - -datasource.queryStep=1h - -remoteWrite.url=http://victoria-metrics-single-server:8428 - -rule=/etc/vmalert/rules/*.yaml + - -configCheckInterval=30s - -evaluationInterval=15m - -httpListenAddr=:8880 ports: