Skip to content

Commit fb22c01

Browse files
committed
k8s: rely on namespace informer label selector
\nSigned-off-by: avlitman <alitman@redhat.com>\nSigned-off-by: Shirly Radco <sradco@redhat.com>\nSigned-off-by: machadovilaca <machadovilaca@gmail.com>\nCo-authored-by: Cursor AI Agent <cursor-ai@users.noreply.github.com>\n
1 parent f1c2e52 commit fb22c01

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/k8s/namespace.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ func (nm *namespaceManager) updateMonitoringNamespace(ns *corev1.Namespace) {
9090
nm.mu.Lock()
9191
defer nm.mu.Unlock()
9292

93-
if ns.Labels != nil && ns.Labels[ClusterMonitoringLabel] == "true" {
94-
nm.monitoringNamespaces[ns.Name] = true
95-
} else {
96-
delete(nm.monitoringNamespaces, ns.Name)
97-
}
93+
nm.monitoringNamespaces[ns.Name] = true
9894
}
9995

10096
func (nm *namespaceManager) removeMonitoringNamespace(name string) {

0 commit comments

Comments
 (0)