From 4f61a31eb16ea6025218c098e7484d894defdb5c Mon Sep 17 00:00:00 2001 From: Theo Brigitte Date: Fri, 20 Dec 2024 16:11:54 +0100 Subject: [PATCH] add namespace=kube-system to unit tests --- .../atlas/alerting-rules/promtail.rules.test.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/tests/providers/global/platform/atlas/alerting-rules/promtail.rules.test.yml b/test/tests/providers/global/platform/atlas/alerting-rules/promtail.rules.test.yml index 75dbf3c7..90e92e97 100644 --- a/test/tests/providers/global/platform/atlas/alerting-rules/promtail.rules.test.yml +++ b/test/tests/providers/global/platform/atlas/alerting-rules/promtail.rules.test.yml @@ -6,18 +6,18 @@ tests: - interval: 1m input_series: # For the first 60min: test with 1 pod: none, up, down - - series: 'up{container="promtail", cluster_id="gauss", cluster_type="management_cluster", installation="gauss", pod="promtail-1xxxx", provider="aws", pipeline="testing"}' + - series: 'up{container="promtail", cluster_id="gauss", cluster_type="management_cluster", installation="gauss", namespace="kube-system", pod="promtail-1xxxx", provider="aws", pipeline="testing"}' values: "_x20 1+0x20 0+0x40" - - series: kube_pod_info{cluster_id="gauss", cluster_type="management_cluster", installation="gauss", pod="promtail-1xxxx", node="ip-10-0-5-1.eu-west-1.compute.internal", provider="aws", pipeline="testing"} + - series: kube_pod_info{cluster_id="gauss", cluster_type="management_cluster", installation="gauss", namespace="kube-system", pod="promtail-1xxxx", node="ip-10-0-5-1.eu-west-1.compute.internal", provider="aws", pipeline="testing"} values: "1x180" # From 60min: test with 2 pods: 1 up and 1 down, 2 up, 2 down. - - series: 'up{container="promtail", cluster_id="gauss", cluster_type="management_cluster", installation="gauss", pod="promtail-2xxxx", provider="aws", pipeline="testing"}' + - series: 'up{container="promtail", cluster_id="gauss", cluster_type="management_cluster", installation="gauss", namespace="kube-system", pod="promtail-2xxxx", provider="aws", pipeline="testing"}' values: "_x80 1+0x40 1+0x20 0+0x40" - - series: kube_pod_info{cluster_id="gauss", cluster_type="management_cluster", installation="gauss", pod="promtail-2xxxx", node="ip-10-0-5-2.eu-west-1.compute.internal", provider="aws", pipeline="testing"} + - series: kube_pod_info{cluster_id="gauss", cluster_type="management_cluster", installation="gauss", namespace="kube-system", pod="promtail-2xxxx", node="ip-10-0-5-2.eu-west-1.compute.internal", provider="aws", pipeline="testing"} values: "1x180" - - series: 'up{container="promtail", cluster_type="management_cluster", cluster_id="gauss", installation="gauss", pod="promtail-3xxxx", provider="aws", pipeline="testing"}' + - series: 'up{container="promtail", cluster_type="management_cluster", cluster_id="gauss", installation="gauss", namespace="kube-system", pod="promtail-3xxxx", provider="aws", pipeline="testing"}' values: "_x80 0+0x40 1+0x20 0+0x40" - - series: kube_pod_info{cluster_id="gauss", cluster_type="management_cluster", installation="gauss", pod="promtail-3xxxx", node="ip-10-0-5-3.eu-west-1.compute.internal", provider="aws", pipeline="testing"} + - series: kube_pod_info{cluster_id="gauss", cluster_type="management_cluster", installation="gauss", namespace="kube-system", pod="promtail-3xxxx", node="ip-10-0-5-3.eu-west-1.compute.internal", provider="aws", pipeline="testing"} values: "1x180" alert_rule_test: - alertname: PromtailDown @@ -38,6 +38,7 @@ tests: cluster_id: gauss cluster_type: management_cluster installation: gauss + namespace: kube-system node: ip-10-0-5-1.eu-west-1.compute.internal pipeline: testing pod: promtail-1xxxx @@ -63,6 +64,7 @@ tests: cluster_id: gauss cluster_type: management_cluster installation: gauss + namespace: kube-system node: ip-10-0-5-3.eu-west-1.compute.internal pipeline: testing pod: promtail-3xxxx @@ -89,6 +91,7 @@ tests: cluster_id: gauss cluster_type: management_cluster installation: gauss + namespace: kube-system node: ip-10-0-5-2.eu-west-1.compute.internal pipeline: testing pod: promtail-2xxxx @@ -110,6 +113,7 @@ tests: cluster_id: gauss cluster_type: management_cluster installation: gauss + namespace: kube-system node: ip-10-0-5-3.eu-west-1.compute.internal pipeline: testing pod: promtail-3xxxx