From d11b4a18e4c8b9d78e2e162db8f8112c8178ec4e Mon Sep 17 00:00:00 2001 From: Kaustav Majumder Date: Mon, 29 Apr 2024 14:26:41 +0530 Subject: [PATCH] Adding empty label selector for prom service monitor selector Signed-off-by: Kaustav Majumder --- templates/prometheus.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/templates/prometheus.go b/templates/prometheus.go index d732e382bd..0742f03fcd 100644 --- a/templates/prometheus.go +++ b/templates/prometheus.go @@ -10,12 +10,6 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" ) -var serviceMonitorSelector = metav1.LabelSelector{ - MatchLabels: map[string]string{ - "app": "odf-prometheus", - }, -} - var ruleSelector = metav1.LabelSelector{ MatchLabels: map[string]string{ "prometheus": "rook-prometheus", @@ -31,7 +25,7 @@ var ( var PrometheusSpecTemplate = promv1.PrometheusSpec{ CommonPrometheusFields: promv1.CommonPrometheusFields{ ServiceAccountName: "prometheus-k8s", - ServiceMonitorSelector: &serviceMonitorSelector, + ServiceMonitorSelector: &metav1.LabelSelector{}, ListenLocal: true, Resources: defaults.MonitoringResources["prometheus"], Containers: []corev1.Container{{