Skip to content

Commit

Permalink
kube-ovn-controller: remove unused codes (#3692)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored Feb 4, 2024
1 parent f2be2d5 commit a487f61
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit a487f61

Please sign in to comment.