Skip to content

Commit

Permalink
Merge pull request #382 from csibbitt/OSPRH-6664/DashboardPrometheusR…
Browse files Browse the repository at this point in the history
…ule_no_selector_required

Remove unused selector on DashboardPrometheusRule
  • Loading branch information
openshift-merge-bot[bot] authored Apr 30, 2024
2 parents 2b08ec0 + 96be208 commit f5c888b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions controllers/metricstorage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion pkg/metricstorage/dashboard_prometheus_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
func DashboardPrometheusRule(
instance *telemetryv1.MetricStorage,
labels map[string]string,
_ map[string]string,
) *monv1.PrometheusRule {

prometheusRule := &monv1.PrometheusRule{
Expand Down

0 comments on commit f5c888b

Please sign in to comment.