monitoring: reload vmalert rules automatically
This commit is contained in:
parent
b0599f4318
commit
17b25c4429
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user