diff --git a/controllers/metricstorage_controller.go b/controllers/metricstorage_controller.go index 7a40f0a4..f276f248 100644 --- a/controllers/metricstorage_controller.go +++ b/controllers/metricstorage_controller.go @@ -553,10 +553,7 @@ func (r *MetricStorageReconciler) reconcileNormal( }, } op, err = controllerutil.CreateOrPatch(ctx, r.Client, prometheusRule, func() error { - ruleLabels := map[string]string{ - common.AppSelector: telemetryv1.DefaultServiceName, - } - desiredPrometheusRule := metricstorage.DashboardPrometheusRule(instance, serviceLabels, ruleLabels) + desiredPrometheusRule := metricstorage.DashboardPrometheusRule(instance, serviceLabels) desiredPrometheusRule.Spec.DeepCopyInto(&prometheusRule.Spec) prometheusRule.ObjectMeta.Labels = desiredPrometheusRule.ObjectMeta.Labels err = controllerutil.SetControllerReference(instance, prometheusRule, r.Scheme) diff --git a/pkg/metricstorage/dashboard_prometheus_rule.go b/pkg/metricstorage/dashboard_prometheus_rule.go index aa1a812c..3efa11fb 100644 --- a/pkg/metricstorage/dashboard_prometheus_rule.go +++ b/pkg/metricstorage/dashboard_prometheus_rule.go @@ -26,7 +26,6 @@ import ( func DashboardPrometheusRule( instance *telemetryv1.MetricStorage, labels map[string]string, - _ map[string]string, ) *monv1.PrometheusRule { prometheusRule := &monv1.PrometheusRule{