From 3be2f727fa91f254d05992c37b666b91eae672e4 Mon Sep 17 00:00:00 2001 From: Joao Morais Date: Mon, 26 Jan 2026 10:31:30 -0300 Subject: [PATCH] filter ingress namespace on UnmanagedRoutes metric Route controller triggers the UnmanagedRoutes metric whenever an unmanaged Ingress resource owns a Route resource. An ingress is considered managed when it points to an existing ingress class, and this ingress class configures spec.controller as "openshift.io/ingress-to-route" controller. The management check was incorrectly filtering ingress resources by missing to check its namespace, so a managed ingress that owns a router would be considered unmanaged if an unmanaged ingress on another namespace shares the same name. --- pkg/route/ingress/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/route/ingress/metrics.go b/pkg/route/ingress/metrics.go index 81e9b7f1..7c383c84 100644 --- a/pkg/route/ingress/metrics.go +++ b/pkg/route/ingress/metrics.go @@ -84,7 +84,7 @@ func (c *Controller) Collect(ch chan<- prometheus.Metric) { if err != nil || ingress == nil { continue } - if ingress.Name == owner { + if ingress.Name == owner && ingress.Namespace == routeInstance.Namespace { managed, err := c.ingressManaged(ingress) if err != nil { utilruntime.HandleError(err)