From 537b37223a8e6b56e0736f9c8ccf8cb9f73bcd81 Mon Sep 17 00:00:00 2001 From: QuantumEnigmaa Date: Mon, 20 May 2024 15:54:04 +0200 Subject: [PATCH] removed unused function --- pkg/monitoring/mimir/utils.go | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/pkg/monitoring/mimir/utils.go b/pkg/monitoring/mimir/utils.go index 0fef2c57..44e49012 100644 --- a/pkg/monitoring/mimir/utils.go +++ b/pkg/monitoring/mimir/utils.go @@ -3,7 +3,6 @@ package mimir import ( "context" "fmt" - "log" "github.com/giantswarm/observability-operator/pkg/monitoring/prometheusagent" corev1 "k8s.io/api/core/v1" @@ -11,29 +10,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/config" ) -// Checks whether Mimir is enabled in the cluster by listing the pods in the Mimir namespace. -func IsMimirEnabled(ctx context.Context) bool { - cfg, err := config.GetConfig() - if err != nil { - log.Fatal(err) - } - - c, err := client.New(cfg, client.Options{}) - if err != nil { - log.Fatal(err) - } - - mimirPods := &corev1.PodList{} - err = c.List(ctx, mimirPods, client.InNamespace("mimir")) - - if err != nil { - log.Fatal("error getting pods: %v\n", err) - } - - // If pods were found in the mimir namespace, this means that mimir is running. - return len(mimirPods.Items) > 0 -} - func GetMimirIngressPassword(ctx context.Context, mc string) (string, error) { cfg, err := config.GetConfig() if err != nil {