Add event handlers to network policy controller

pull/2363/head
Erik Wilson 2020-10-07 11:59:24 -07:00
parent c3c983198f
commit 045cd49ab5
No known key found for this signature in database
GPG Key ID: 28E43BB8BE202CF8
1 changed files with 3 additions and 0 deletions

View File

@ -1726,12 +1726,15 @@ func NewNetworkPolicyController(
npc.podLister = podInformer.GetIndexer()
npc.PodEventHandler = npc.newPodEventHandler()
podInformer.AddEventHandler(npc.PodEventHandler)
npc.nsLister = nsInformer.GetIndexer()
npc.NamespaceEventHandler = npc.newNamespaceEventHandler()
nsInformer.AddEventHandler(npc.NamespaceEventHandler)
npc.npLister = npInformer.GetIndexer()
npc.NetworkPolicyEventHandler = npc.newNetworkPolicyEventHandler()
npInformer.AddEventHandler(npc.NetworkPolicyEventHandler)
return &npc, nil
}