From 64a917e98ba55977cfcac1d65418e2e04934c27b Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 2 Aug 2023 18:33:01 +0200 Subject: [PATCH] Fix Signed-off-by: Pavol Loffay --- pkg/collector/reconcile/servicemonitor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/collector/reconcile/servicemonitor.go b/pkg/collector/reconcile/servicemonitor.go index 3a9e0dbbb9..942e16586c 100644 --- a/pkg/collector/reconcile/servicemonitor.go +++ b/pkg/collector/reconcile/servicemonitor.go @@ -60,7 +60,7 @@ func desiredServiceMonitors(_ context.Context, params Params) []monitoringv1.Ser Namespace: col.Namespace, Name: naming.ServiceMonitor(col.Name), Labels: map[string]string{ - "app.kubernetes.io/name": naming.ServiceMonitor(params.Instance.Namespace), + "app.kubernetes.io/name": naming.ServiceMonitor(params.Instance.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", },