diff --git a/controller.go b/controller.go index ab6ce035..f279db5d 100644 --- a/controller.go +++ b/controller.go @@ -148,7 +148,7 @@ func NewController( // as syncing informer caches and starting workers. It will block until stopCh // is closed, at which point it will shutdown the workqueue and wait for // workers to finish processing their current work items. -func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error { +func (c *Controller) Run(workers int, stopCh <-chan struct{}) error { defer utilruntime.HandleCrash() defer c.workqueue.ShutDown() @@ -163,7 +163,7 @@ func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error { klog.Info("Starting workers") // Launch two workers to process Foo resources - for i := 0; i < threadiness; i++ { + for i := 0; i < workers; i++ { go wait.Until(c.runWorker, time.Second, stopCh) }