Skip to content

Commit 0bf5b5a

Browse files
astraw99k8s-publishing-bot
authored andcommittedAug 9, 2021
unify worker num to workers
Kubernetes-commit: e6df935fd30c56a8ece0da6152c60fc725d942b7
1 parent 6e98cc2 commit 0bf5b5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func NewController(
148148
// as syncing informer caches and starting workers. It will block until stopCh
149149
// is closed, at which point it will shutdown the workqueue and wait for
150150
// workers to finish processing their current work items.
151-
func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error {
151+
func (c *Controller) Run(workers int, stopCh <-chan struct{}) error {
152152
defer utilruntime.HandleCrash()
153153
defer c.workqueue.ShutDown()
154154

@@ -163,7 +163,7 @@ func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error {
163163

164164
klog.Info("Starting workers")
165165
// Launch two workers to process Foo resources
166-
for i := 0; i < threadiness; i++ {
166+
for i := 0; i < workers; i++ {
167167
go wait.Until(c.runWorker, time.Second, stopCh)
168168
}
169169

0 commit comments

Comments
 (0)
Failed to load comments.