diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 068a353e976..b9d8052f705 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -135,22 +135,12 @@ type Controller struct { resetIptablesEipQueue workqueue.RateLimitingInterface delIptablesEipQueue workqueue.RateLimitingInterface - podAnnotatedIptablesEipLister v1.PodLister - podAnnotatedIptablesEipSynced cache.InformerSynced - addPodAnnotatedIptablesEipQueue workqueue.RateLimitingInterface - delPodAnnotatedIptablesEipQueue workqueue.RateLimitingInterface - iptablesFipsLister kubeovnlister.IptablesFIPRuleLister iptablesFipSynced cache.InformerSynced addIptablesFipQueue workqueue.RateLimitingInterface updateIptablesFipQueue workqueue.RateLimitingInterface delIptablesFipQueue workqueue.RateLimitingInterface - podAnnotatedIptablesFipLister v1.PodLister - podAnnotatedIptablesFipSynced cache.InformerSynced - addPodAnnotatedIptablesFipQueue workqueue.RateLimitingInterface - delPodAnnotatedIptablesFipQueue workqueue.RateLimitingInterface - iptablesDnatRulesLister kubeovnlister.IptablesDnatRuleLister iptablesDnatRuleSynced cache.InformerSynced addIptablesDnatRuleQueue workqueue.RateLimitingInterface @@ -290,8 +280,6 @@ func Run(ctx context.Context, config *Configuration) { providerNetworkInformer := kubeovnInformerFactory.Kubeovn().V1().ProviderNetworks() sgInformer := kubeovnInformerFactory.Kubeovn().V1().SecurityGroups() podInformer := informerFactory.Core().V1().Pods() - podAnnotatedIptablesEipInformer := informerFactory.Core().V1().Pods() - podAnnotatedIptablesFipInformer := informerFactory.Core().V1().Pods() namespaceInformer := informerFactory.Core().V1().Namespaces() nodeInformer := informerFactory.Core().V1().Nodes() serviceInformer := informerFactory.Core().V1().Services() @@ -373,22 +361,12 @@ func Run(ctx context.Context, config *Configuration) { resetIptablesEipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "ResetIptablesEip"), delIptablesEipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "DeleteIptablesEip"), - podAnnotatedIptablesEipLister: podAnnotatedIptablesEipInformer.Lister(), - podAnnotatedIptablesEipSynced: podAnnotatedIptablesEipInformer.Informer().HasSynced, - addPodAnnotatedIptablesEipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "AddPodAnnotatedIptablesEip"), - delPodAnnotatedIptablesEipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "DeletePodAnnotatedIptablesEip"), - iptablesFipsLister: iptablesFipInformer.Lister(), iptablesFipSynced: iptablesFipInformer.Informer().HasSynced, addIptablesFipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "AddIptablesFip"), updateIptablesFipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "UpdateIptablesFip"), delIptablesFipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "DeleteIptablesFip"), - podAnnotatedIptablesFipLister: podAnnotatedIptablesFipInformer.Lister(), - podAnnotatedIptablesFipSynced: podAnnotatedIptablesFipInformer.Informer().HasSynced, - addPodAnnotatedIptablesFipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "AddPodAnnotatedIptablesFip"), - delPodAnnotatedIptablesFipQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "DeletePodAnnotatedIptablesFip"), - iptablesDnatRulesLister: iptablesDnatRuleInformer.Lister(), iptablesDnatRuleSynced: iptablesDnatRuleInformer.Informer().HasSynced, addIptablesDnatRuleQueue: workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "AddIptablesDnatRule"), @@ -533,7 +511,6 @@ func Run(ctx context.Context, config *Configuration) { controller.vpcNatGatewaySynced, controller.vpcSynced, controller.subnetSynced, controller.ipSynced, controller.virtualIpsSynced, controller.iptablesEipSynced, controller.iptablesFipSynced, controller.iptablesDnatRuleSynced, controller.iptablesSnatRuleSynced, - controller.podAnnotatedIptablesEipSynced, controller.podAnnotatedIptablesFipSynced, controller.vlanSynced, controller.podsSynced, controller.namespacesSynced, controller.nodesSynced, controller.serviceSynced, controller.endpointsSynced, controller.configMapsSynced, controller.ovnEipSynced, controller.ovnFipSynced, controller.ovnSnatRuleSynced, @@ -911,12 +888,6 @@ func (c *Controller) shutdown() { c.updateOvnDnatRuleQueue.ShutDown() c.delOvnDnatRuleQueue.ShutDown() - c.addPodAnnotatedIptablesEipQueue.ShutDown() - c.delPodAnnotatedIptablesEipQueue.ShutDown() - - c.addPodAnnotatedIptablesFipQueue.ShutDown() - c.delPodAnnotatedIptablesFipQueue.ShutDown() - if c.config.EnableNP { c.updateNpQueue.ShutDown() c.deleteNpQueue.ShutDown()