From 0108aa8301df433beebd167db509b3d196b301fb Mon Sep 17 00:00:00 2001 From: Saswata Mukherjee Date: Tue, 17 Oct 2023 13:51:06 +0530 Subject: [PATCH 1/2] Remove kubelet_runtime_operations_duration_seconds from allowlist (#1257) Signed-off-by: Saswata Mukherjee --- .../manifests/base/config/metrics_allowlist.yaml | 1 - tests/pkg/testdata/ignored-metric-list | 1 - 2 files changed, 2 deletions(-) diff --git a/operators/multiclusterobservability/manifests/base/config/metrics_allowlist.yaml b/operators/multiclusterobservability/manifests/base/config/metrics_allowlist.yaml index 1951f16852..c709fc3c45 100644 --- a/operators/multiclusterobservability/manifests/base/config/metrics_allowlist.yaml +++ b/operators/multiclusterobservability/manifests/base/config/metrics_allowlist.yaml @@ -92,7 +92,6 @@ data: - kube_resourcequota - kubelet_running_container_count - kubelet_runtime_operations - - kubelet_runtime_operations_duration_seconds - kubelet_runtime_operations_duration_seconds_sum - kubelet_volume_stats_available_bytes - kubelet_volume_stats_capacity_bytes diff --git a/tests/pkg/testdata/ignored-metric-list b/tests/pkg/testdata/ignored-metric-list index f6dcdd7fb5..a5ee98cafd 100644 --- a/tests/pkg/testdata/ignored-metric-list +++ b/tests/pkg/testdata/ignored-metric-list @@ -49,7 +49,6 @@ kube_pod_container_resource_requests_cpu_cores kube_pod_container_resource_requests_memory_bytes kubelet_running_container_count kubelet_runtime_operations -kubelet_runtime_operations_duration_seconds kubelet_runtime_operations_duration_seconds_sum kubelet_volume_stats_available_bytes kubelet_volume_stats_capacity_bytes From 27eea7599f2c3777e7a4fcd17a7ded47e4310f2a Mon Sep 17 00:00:00 2001 From: Saswata Mukherjee Date: Tue, 17 Oct 2023 15:53:16 +0530 Subject: [PATCH 2/2] Remove AM integration test function with slack hook url (#1258) Signed-off-by: Saswata Mukherjee --- tests/pkg/tests/observability_alert_test.go | 4 ++ tests/pkg/utils/mco_deploy.go | 49 --------------------- 2 files changed, 4 insertions(+), 49 deletions(-) diff --git a/tests/pkg/tests/observability_alert_test.go b/tests/pkg/tests/observability_alert_test.go index 1505703c93..5fb6cbd937 100644 --- a/tests/pkg/tests/observability_alert_test.go +++ b/tests/pkg/tests/observability_alert_test.go @@ -192,6 +192,10 @@ var _ = Describe("Observability:", func() { }, EventuallyTimeoutMinute*5, EventuallyIntervalSecond*5).Should(Succeed()) }) + // TODO(subbarao): Re-enable slack integration test once issue mentioned in + // https://github.com/stolostron/multicluster-observability-operator/pull/1112 & + // https://github.com/stolostron/multicluster-observability-operator/pull/1258 + // is addressed. // It("[P2][Sev2][observability][Stable] Should modify the SECRET: alertmanager-config (alert/g0)", func() { // By("Editing the secret, we should be able to add the third partying tools integrations") // secret := utils.CreateCustomAlertConfigYaml(testOptions.HubCluster.BaseDomain) diff --git a/tests/pkg/utils/mco_deploy.go b/tests/pkg/utils/mco_deploy.go index e451dfb6be..2d4b156ceb 100644 --- a/tests/pkg/utils/mco_deploy.go +++ b/tests/pkg/utils/mco_deploy.go @@ -5,7 +5,6 @@ package utils import ( "context" - b64 "encoding/base64" "encoding/json" "fmt" "io/ioutil" @@ -869,51 +868,3 @@ func UninstallMCO(opt TestOptions) error { return nil } - -func CreateCustomAlertConfigYaml(baseDomain string) []byte { - global := fmt.Sprintf(`global: - resolve_timeout: 5m -route: - receiver: default-receiver - routes: - - match: - alertname: Watchdog - receiver: default-receiver - group_by: ['alertname', 'cluster'] - group_wait: 5s - group_interval: 5s - repeat_interval: 2m -receivers: - - name: default-receiver - slack_configs: - - api_url: https://hooks.slack.com/services/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 - channel: team-observability-test - footer: | - {{ .CommonLabels.cluster }} - mrkdwn_in: - - text - title: '[{{ .Status | toUpper }}] {{ .CommonLabels.alertname }} ({{ .CommonLabels.severity }})' - text: |- - {{ range .Alerts }} - *Alerts:* {{ .Annotations.summary }} - *Description:* {{ .Annotations.description }} - *Details:* - {{ range .Labels.SortedPairs }} • *{{ .Name }}:* {{ .Value }} - {{ end }} - {{ end }} - title_link: https://multicloud-console.apps.%s/grafana/explore?orgId=1&left=["now-1h","now","Observatorium",{"expr":"ALERTS{alertname=\"{{ .CommonLabels.alertname }}\"}","context":"explore"},{"mode":"Metrics"},{"ui":[true,true,true,"none"]}] -`, baseDomain) - encodedGlobal := b64.StdEncoding.EncodeToString([]byte(global)) - - instance := fmt.Sprintf(`kind: Secret -apiVersion: v1 -metadata: - name: alertmanager-config - namespace: open-cluster-management-observability -data: - alertmanager.yaml: >- - %s -`, encodedGlobal) - - return []byte(instance) -}