Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into remove_prometheus_rules
Browse files Browse the repository at this point in the history
Signed-off-by: Coleen Iona Quadros <[email protected]>
  • Loading branch information
coleenquadros committed Oct 17, 2023
2 parents 09dd01c + 27eea75 commit 53229c1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/pkg/testdata/ignored-metric-list
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions tests/pkg/tests/observability_alert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
49 changes: 0 additions & 49 deletions tests/pkg/utils/mco_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package utils

import (
"context"
b64 "encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -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)
}

0 comments on commit 53229c1

Please sign in to comment.