From 0e8c7bf0749bd99ba939fb4e9941012267a225e9 Mon Sep 17 00:00:00 2001 From: Rafal Wegrzycki Date: Tue, 7 Sep 2021 17:35:12 +0200 Subject: [PATCH] AP: fix watch-namespace for NAP resources --- internal/k8s/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/k8s/controller.go b/internal/k8s/controller.go index b4ba04146c..09fbbdcd8a 100644 --- a/internal/k8s/controller.go +++ b/internal/k8s/controller.go @@ -244,7 +244,7 @@ func NewLoadBalancerController(input NewLoadBalancerControllerInput) *LoadBalanc lbc.addPodHandler() if lbc.appProtectEnabled { - lbc.dynInformerFactory = dynamicinformer.NewDynamicSharedInformerFactory(lbc.dynClient, 0) + lbc.dynInformerFactory = dynamicinformer.NewFilteredDynamicSharedInformerFactory(lbc.dynClient, 0, lbc.namespace, nil) lbc.addAppProtectPolicyHandler(createAppProtectPolicyHandlers(lbc)) lbc.addAppProtectLogConfHandler(createAppProtectLogConfHandlers(lbc))