Skip to content

Commit

Permalink
Merge pull request #99 from chenchun/delete
Browse files Browse the repository at this point in the history
Fix unbind pod is slow if lots of pod exits at the same time
  • Loading branch information
ChenLingPeng committed Nov 6, 2020
2 parents 06ea3e0 + aa83854 commit 7d08fa0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/ipam/schedulerplugin/floatingip_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewFloatingIPPlugin(conf Conf, args *PluginFactoryArgs) (*FloatingIPPlugin,
nodeSubnet: make(map[string]*net.IPNet),
PluginFactoryArgs: args,
conf: &conf,
unreleased: make(chan *releaseEvent, 1000),
unreleased: make(chan *releaseEvent, 50000),
dpLockPool: keymutex.NewHashed(500000),
podLockPool: keymutex.NewHashed(500000),
}
Expand Down Expand Up @@ -108,7 +108,9 @@ func (p *FloatingIPPlugin) Run(stop chan struct{}) {
}
p.syncPodIPsIntoDB()
}, time.Duration(p.conf.ResyncInterval)*time.Minute, stop)
go p.loop(stop)
for i := 0; i < 5; i++ {
go p.loop(stop)
}
}

// updateConfigMap fetches the newest floatingips configmap and syncs in memory/db config,
Expand Down

0 comments on commit 7d08fa0

Please sign in to comment.