fix controller Start method signature
Signed-off-by: Roland.Ma <rolandma@yunify.com>
This commit is contained in:
@@ -332,9 +332,9 @@ func (c *IPPoolController) processIPPool(name string) (*time.Duration, error) {
|
||||
return nil, c.updateIPPoolStatus(pool)
|
||||
}
|
||||
|
||||
func (c *IPPoolController) Start(stopCh <-chan struct{}) error {
|
||||
go c.provider.SyncStatus(stopCh, c.ippoolQueue)
|
||||
return c.Run(5, stopCh)
|
||||
func (c *IPPoolController) Start(ctx context.Context) error {
|
||||
go c.provider.SyncStatus(ctx.Done(), c.ippoolQueue)
|
||||
return c.Run(5, ctx.Done())
|
||||
}
|
||||
|
||||
func (c *IPPoolController) Run(workers int, stopCh <-chan struct{}) error {
|
||||
|
||||
@@ -77,7 +77,7 @@ var _ = Describe("test ippool", func() {
|
||||
stopCh := make(chan struct{})
|
||||
go ksInformer.Start(stopCh)
|
||||
go k8sInformer.Start(stopCh)
|
||||
go c.Start(stopCh)
|
||||
go c.Start(context.Background())
|
||||
|
||||
It("test create ippool", func() {
|
||||
clone := pool.DeepCopy()
|
||||
|
||||
Reference in New Issue
Block a user