@@ -1202,7 +1202,7 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
1202
1202
1203
1203
// This test is already covered in test/e2e/config_test.go::TestUserWorkloadMonitorPrometheusK8Config
1204
1204
1205
- /* g.It("Author:hongyli-High-49745-High-50519-Retention for UWM Prometheus and thanos ruler", func() {
1205
+ /* g.It("Author:hongyli-High-49745-High-50519-Retention for UWM Prometheus and thanos ruler", func() {
1206
1206
exutil.By("Check retention size of prometheus user workload")
1207
1207
checkRetention(oc, "openshift-user-workload-monitoring", "prometheus-user-workload", "storage.tsdb.retention.size=5GiB", uwmLoadTime)
1208
1208
exutil.By("Check retention of prometheus user workload")
@@ -1242,7 +1242,7 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
1242
1242
1243
1243
// This test is already covered in test/e2e/config_test.go::TestUserWorkloadMonitorPrometheusK8Config and test/e2e/config_test.go::TestClusterMonitorPrometheusK8Config
1244
1244
1245
- /* g.It("Author:tagao-LEVEL0-Medium-46301-Allow OpenShift users to configure query log file for Prometheus", func() {
1245
+ /* g.It("Author:tagao-LEVEL0-Medium-46301-Allow OpenShift users to configure query log file for Prometheus", func() {
1246
1246
exutil.By("confirm prometheus-k8s-0 pod is ready for check")
1247
1247
MONpod, _ := oc.AsAdmin().WithoutNamespace().Run("get").Args("pod", "-n", "openshift-monitoring").Output()
1248
1248
e2e.Logf("the MON pods condition: %s", MONpod)
@@ -1274,7 +1274,7 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
1274
1274
1275
1275
// This test is already covered in pkg/manifests/manifests_test.go::TestRemoteWriteAuthorizationConfig
1276
1276
1277
- /* g.It("Author:tagao-Medium-50008-Expose sigv4 settings for remote write in the CMO configuration [Serial]", func() {
1277
+ /* g.It("Author:tagao-Medium-50008-Expose sigv4 settings for remote write in the CMO configuration [Serial]", func() {
1278
1278
var (
1279
1279
sigv4ClusterCM = filepath.Join(monitoringBaseDir, "sigv4-cluster-monitoring-cm.yaml")
1280
1280
sigv4UwmCM = filepath.Join(monitoringBaseDir, "sigv4-uwm-monitoring-cm.yaml")
@@ -1330,7 +1330,7 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
1330
1330
1331
1331
// This test is already covered in pkg/manifests/manifests_test.go::TestPrometheusK8sRemoteWriteOauth2
1332
1332
1333
- /* g.It("Author:tagao-Medium-49694-Expose OAuth2 settings for remote write in the CMO configuration [Serial]", func() {
1333
+ /* g.It("Author:tagao-Medium-49694-Expose OAuth2 settings for remote write in the CMO configuration [Serial]", func() {
1334
1334
var (
1335
1335
oauth2ClusterCM = filepath.Join(monitoringBaseDir, "oauth2-cluster-monitoring-cm.yaml")
1336
1336
oauth2UwmCM = filepath.Join(monitoringBaseDir, "oauth2-uwm-monitoring-cm.yaml")
@@ -1380,7 +1380,7 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
1380
1380
1381
1381
// This test is already covered in pkg/manifests/manifests_test.go::TestAlertmanagerConfigPipeline
1382
1382
1383
- /* g.It("Author:tagao-Medium-47519-Platform prometheus operator should reconcile AlertmanagerConfig resources from user namespaces [Serial]", func() {
1383
+ /* g.It("Author:tagao-Medium-47519-Platform prometheus operator should reconcile AlertmanagerConfig resources from user namespaces [Serial]", func() {
1384
1384
var (
1385
1385
enableAltmgrConfig = filepath.Join(monitoringBaseDir, "enableUserAlertmanagerConfig.yaml")
1386
1386
wechatConfig = filepath.Join(monitoringBaseDir, "exampleAlertConfigAndSecret.yaml")
@@ -1437,7 +1437,7 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
1437
1437
}) */
1438
1438
1439
1439
// This test is already covered in pkg/manifests/manifests_test.go::TestPrometheusK8sRemoteWriteAuthorizationConfig and test/e2e/prometheus_test.go::TestPrometheusRemoteWrite
1440
- /* g.It("Author:tagao-Medium-49404-Medium-49176-Expose Authorization settings for remote write in the CMO configuration, Add the relabel config to all user-supplied remote_write configurations [Serial]", func() {
1440
+ /* g.It("Author:tagao-Medium-49404-Medium-49176-Expose Authorization settings for remote write in the CMO configuration, Add the relabel config to all user-supplied remote_write configurations [Serial]", func() {
1441
1441
var (
1442
1442
authClusterCM = filepath.Join(monitoringBaseDir, "auth-cluster-monitoring-cm.yaml")
1443
1443
authUwmCM = filepath.Join(monitoringBaseDir, "auth-uwm-monitoring-cm.yaml")
@@ -1494,8 +1494,9 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
1494
1494
checkRmtWrtConfig(oc, "openshift-user-workload-monitoring", "prometheus-user-workload-0", "target_label: cluster_id_1")
1495
1495
}) */
1496
1496
1497
+ // TODO: remove g.FlakeAttempts(5), just for debugging
1497
1498
1498
- g .It ("Author:tagao-Low-43037-Should not have error for oc adm inspect clusteroperator monitoring command" , func () {
1499
+ g .It ("Author:tagao-Low-43037-Should not have error for oc adm inspect clusteroperator monitoring command" , g . FlakeAttempts ( 5 ), func () {
1499
1500
exutil .By ("delete must-gather file at the end of case" )
1500
1501
defer exec .Command ("bash" , "-c" , "rm -rf /tmp/must-gather-43037" ).Output ()
1501
1502
@@ -1713,53 +1714,53 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
1713
1714
1714
1715
// This test is already covered by test/e2e/thanos_ruler_test.go::TestUserWorkloadThanosRulerWithAdditionalAlertmanagers and test/e2e/user_workload_monitoring_test.go::TestUserWorkloadMonitoringWithAdditionalAlertmanagerConfigs
1715
1716
1716
- /* g.It("ConnectedOnly-Author:tagao-Medium-43286-Allow sending alerts to external Alertmanager for user workload monitoring components - enabled in-cluster alertmanager", func() {
1717
- var (
1718
- testAlertmanager = filepath.Join(monitoringBaseDir, "example-alertmanager.yaml")
1719
- exampleAlert = filepath.Join(monitoringBaseDir, "example-alert-rule.yaml")
1720
- exampleAlert2 = filepath.Join(monitoringBaseDir, "leaf-prometheus-rule.yaml")
1721
- )
1722
- exutil.By("create alertmanager and set external alertmanager for prometheus/thanosRuler under openshift-user-workload-monitoring")
1723
- createResourceFromYaml(oc, "openshift-user-workload-monitoring", testAlertmanager)
1724
- defer oc.AsAdmin().WithoutNamespace().Run("delete").Args("alertmanager", "test-alertmanager", "-n", "openshift-user-workload-monitoring").Execute()
1725
-
1726
- exutil.By("check alertmanager pod is created")
1727
- alertmanagerTestPodCheck(oc)
1728
-
1729
- exutil.By("skip case on disconnected cluster")
1730
- output, err := oc.AsAdmin().Run("get").Args("pod", "alertmanager-test-alertmanager-0", "-n", "openshift-user-workload-monitoring").Output()
1731
- o.Expect(err).NotTo(o.HaveOccurred())
1732
- e2e.Logf("the pod condition: %s", output)
1733
- if output != "{}" && strings.Contains(output, "ImagePullBackOff") {
1734
- g.Skip("This case can not execute on a disconnected cluster!")
1735
- }
1736
-
1737
- exutil.By("create example PrometheusRule under user namespace")
1738
- oc.SetupProject()
1739
- ns1 := oc.Namespace()
1740
- createResourceFromYaml(oc, ns1, exampleAlert)
1741
-
1742
- exutil.By("create another user namespace then create PrometheusRule with leaf-prometheus label")
1743
- oc.SetupProject()
1744
- ns2 := oc.Namespace()
1745
- createResourceFromYaml(oc, ns2, exampleAlert2)
1746
-
1747
- exutil.By("Get token of SA prometheus-k8s")
1748
- token := getSAToken(oc, "prometheus-k8s", "openshift-monitoring")
1749
-
1750
- exutil.By("check the user alerts TestAlert1 and TestAlert2 are shown in \"in-cluster alertmanager\" API")
1751
- checkMetric(oc, `https://alertmanager-main.openshift-monitoring.svc:9094/api/v2/alerts?filter={alertname="TestAlert1"}`, token, "TestAlert1", uwmLoadTime)
1752
- checkMetric(oc, `https://alertmanager-main.openshift-monitoring.svc:9094/api/v2/alerts?filter={alertname="TestAlert1"}`, token, `"generatorURL":"https://console-openshift-console.`, uwmLoadTime)
1753
- checkMetric(oc, `https://alertmanager-main.openshift-monitoring.svc:9094/api/v2/alerts?filter={alertname="TestAlert2"}`, token, "TestAlert2", uwmLoadTime)
1754
- checkMetric(oc, `https://alertmanager-main.openshift-monitoring.svc:9094/api/v2/alerts?filter={alertname="TestAlert2"}`, token, `"generatorURL":"https://console-openshift-console.`, uwmLoadTime)
1755
-
1756
- exutil.By("check the alerts are also sent to external alertmanager")
1757
- queryFromPod(oc, `http://alertmanager-operated.openshift-user-workload-monitoring.svc:9093/api/v2/alerts?filter={alertname="TestAlert1"}`, token, "openshift-user-workload-monitoring", "thanos-ruler-user-workload-0", "thanos-ruler", "TestAlert1", uwmLoadTime)
1758
- queryFromPod(oc, `http://alertmanager-operated.openshift-user-workload-monitoring.svc:9093/api/v2/alerts?filter={alertname="TestAlert1"}`, token, "openshift-user-workload-monitoring", "thanos-ruler-user-workload-0", "thanos-ruler", `"generatorURL":"https://console-openshift-console.`, uwmLoadTime)
1759
- queryFromPod(oc, `http://alertmanager-operated.openshift-user-workload-monitoring.svc:9093/api/v2/alerts?filter={alertname="TestAlert2"}`, token, "openshift-user-workload-monitoring", "thanos-ruler-user-workload-0", "thanos-ruler", "TestAlert2", uwmLoadTime)
1760
- queryFromPod(oc, `http://alertmanager-operated.openshift-user-workload-monitoring.svc:9093/api/v2/alerts?filter={alertname="TestAlert2"}`, token, "openshift-user-workload-monitoring", "thanos-ruler-user-workload-0", "thanos-ruler", `"generatorURL":"https://console-openshift-console.`, uwmLoadTime)
1761
- })
1762
- */
1717
+ /* g.It("ConnectedOnly-Author:tagao-Medium-43286-Allow sending alerts to external Alertmanager for user workload monitoring components - enabled in-cluster alertmanager", func() {
1718
+ var (
1719
+ testAlertmanager = filepath.Join(monitoringBaseDir, "example-alertmanager.yaml")
1720
+ exampleAlert = filepath.Join(monitoringBaseDir, "example-alert-rule.yaml")
1721
+ exampleAlert2 = filepath.Join(monitoringBaseDir, "leaf-prometheus-rule.yaml")
1722
+ )
1723
+ exutil.By("create alertmanager and set external alertmanager for prometheus/thanosRuler under openshift-user-workload-monitoring")
1724
+ createResourceFromYaml(oc, "openshift-user-workload-monitoring", testAlertmanager)
1725
+ defer oc.AsAdmin().WithoutNamespace().Run("delete").Args("alertmanager", "test-alertmanager", "-n", "openshift-user-workload-monitoring").Execute()
1726
+
1727
+ exutil.By("check alertmanager pod is created")
1728
+ alertmanagerTestPodCheck(oc)
1729
+
1730
+ exutil.By("skip case on disconnected cluster")
1731
+ output, err := oc.AsAdmin().Run("get").Args("pod", "alertmanager-test-alertmanager-0", "-n", "openshift-user-workload-monitoring").Output()
1732
+ o.Expect(err).NotTo(o.HaveOccurred())
1733
+ e2e.Logf("the pod condition: %s", output)
1734
+ if output != "{}" && strings.Contains(output, "ImagePullBackOff") {
1735
+ g.Skip("This case can not execute on a disconnected cluster!")
1736
+ }
1737
+
1738
+ exutil.By("create example PrometheusRule under user namespace")
1739
+ oc.SetupProject()
1740
+ ns1 := oc.Namespace()
1741
+ createResourceFromYaml(oc, ns1, exampleAlert)
1742
+
1743
+ exutil.By("create another user namespace then create PrometheusRule with leaf-prometheus label")
1744
+ oc.SetupProject()
1745
+ ns2 := oc.Namespace()
1746
+ createResourceFromYaml(oc, ns2, exampleAlert2)
1747
+
1748
+ exutil.By("Get token of SA prometheus-k8s")
1749
+ token := getSAToken(oc, "prometheus-k8s", "openshift-monitoring")
1750
+
1751
+ exutil.By("check the user alerts TestAlert1 and TestAlert2 are shown in \"in-cluster alertmanager\" API")
1752
+ checkMetric(oc, `https://alertmanager-main.openshift-monitoring.svc:9094/api/v2/alerts?filter={alertname="TestAlert1"}`, token, "TestAlert1", uwmLoadTime)
1753
+ checkMetric(oc, `https://alertmanager-main.openshift-monitoring.svc:9094/api/v2/alerts?filter={alertname="TestAlert1"}`, token, `"generatorURL":"https://console-openshift-console.`, uwmLoadTime)
1754
+ checkMetric(oc, `https://alertmanager-main.openshift-monitoring.svc:9094/api/v2/alerts?filter={alertname="TestAlert2"}`, token, "TestAlert2", uwmLoadTime)
1755
+ checkMetric(oc, `https://alertmanager-main.openshift-monitoring.svc:9094/api/v2/alerts?filter={alertname="TestAlert2"}`, token, `"generatorURL":"https://console-openshift-console.`, uwmLoadTime)
1756
+
1757
+ exutil.By("check the alerts are also sent to external alertmanager")
1758
+ queryFromPod(oc, `http://alertmanager-operated.openshift-user-workload-monitoring.svc:9093/api/v2/alerts?filter={alertname="TestAlert1"}`, token, "openshift-user-workload-monitoring", "thanos-ruler-user-workload-0", "thanos-ruler", "TestAlert1", uwmLoadTime)
1759
+ queryFromPod(oc, `http://alertmanager-operated.openshift-user-workload-monitoring.svc:9093/api/v2/alerts?filter={alertname="TestAlert1"}`, token, "openshift-user-workload-monitoring", "thanos-ruler-user-workload-0", "thanos-ruler", `"generatorURL":"https://console-openshift-console.`, uwmLoadTime)
1760
+ queryFromPod(oc, `http://alertmanager-operated.openshift-user-workload-monitoring.svc:9093/api/v2/alerts?filter={alertname="TestAlert2"}`, token, "openshift-user-workload-monitoring", "thanos-ruler-user-workload-0", "thanos-ruler", "TestAlert2", uwmLoadTime)
1761
+ queryFromPod(oc, `http://alertmanager-operated.openshift-user-workload-monitoring.svc:9093/api/v2/alerts?filter={alertname="TestAlert2"}`, token, "openshift-user-workload-monitoring", "thanos-ruler-user-workload-0", "thanos-ruler", `"generatorURL":"https://console-openshift-console.`, uwmLoadTime)
1762
+ })
1763
+ */
1763
1764
1764
1765
g .It ("Author:tagao-ConnectedOnly-Medium-43311-Allow sending alerts to external Alertmanager for user workload monitoring components - disabled in-cluster alertmanager [Serial]" , func () {
1765
1766
var (
@@ -2671,7 +2672,7 @@ var _ = g.Describe("[sig-monitoring] Cluster_Observability parallel monitoring",
2671
2672
2672
2673
// This test is already covered in test/e2e/alertmanager_test.go::TestAlertmanagerDisabling
2673
2674
2674
- /* g.It("Author:tagao-Medium-43106-disable Alertmanager deployment[Serial]", func() {
2675
+ /* g.It("Author:tagao-Medium-43106-disable Alertmanager deployment[Serial]", func() {
2675
2676
var (
2676
2677
disableAlertmanager = filepath.Join(monitoringBaseDir, "disableAlertmanager.yaml")
2677
2678
)
0 commit comments