Add event handlers to network policy controller

pull/2363/head
Erik Wilson 4 years ago
parent c3c983198f
commit 045cd49ab5
No known key found for this signature in database
GPG Key ID: 28E43BB8BE202CF8

@ -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
}

Loading…
Cancel
Save