From 59ad81a6157f8f9bf454c7c76ae183d751a32a34 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Wed, 27 Sep 2023 15:33:04 +0200 Subject: [PATCH] controller/clusterauthenticationtrust: complete event filter Signed-off-by: Dr. Stefan Schimanski --- .../cluster_authentication_trust_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go b/pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go index dcfb67d3887..e816ed24364 100644 --- a/pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go +++ b/pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go @@ -106,11 +106,11 @@ func NewClusterAuthenticationTrustController(requiredAuthenticationData ClusterA kubeSystemConfigMapInformer.AddEventHandler(cache.FilteringResourceEventHandler{ FilterFunc: func(obj interface{}) bool { if cast, ok := obj.(*corev1.ConfigMap); ok { - return cast.Name == configMapName + return cast.Namespace == configMapNamespace && cast.Name == configMapName } if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok { if cast, ok := tombstone.Obj.(*corev1.ConfigMap); ok { - return cast.Name == configMapName + return cast.Namespace == configMapNamespace && cast.Name == configMapName } } return true // always return true just in case. The checks are fairly cheap