diff --git a/pkg/controller/certificatesigningrequest/certificatesigningrequest_controller.go b/pkg/controller/certificatesigningrequest/certificatesigningrequest_controller.go index 1c2e31cb7..2d6374227 100644 --- a/pkg/controller/certificatesigningrequest/certificatesigningrequest_controller.go +++ b/pkg/controller/certificatesigningrequest/certificatesigningrequest_controller.go @@ -115,7 +115,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++ { go wait.Until(c.runWorker, time.Second, stopCh) } @@ -194,7 +194,7 @@ func (c *Controller) processNextWorkItem() bool { return true } -// syncHandler compares the actual state with the desired, and attempts to +// reconcile compares the actual state with the desired, and attempts to // converge the two. It then updates the Status block of the Foo resource // with the current status of the resource. func (c *Controller) reconcile(key string) error { @@ -202,7 +202,7 @@ func (c *Controller) reconcile(key string) error { // Get the CertificateSigningRequest with this name csr, err := c.csrLister.Get(key) if err != nil { - // The user may no longer exist, in which case we stop + // The resource may no longer exist, in which case we stop // processing. if errors.IsNotFound(err) { utilruntime.HandleError(fmt.Errorf("csr '%s' in work queue no longer exists", key)) diff --git a/pkg/controller/clusterrolebinding/clusterrolebinding_controller.go b/pkg/controller/clusterrolebinding/clusterrolebinding_controller.go index 196910382..75fc95ea7 100644 --- a/pkg/controller/clusterrolebinding/clusterrolebinding_controller.go +++ b/pkg/controller/clusterrolebinding/clusterrolebinding_controller.go @@ -120,7 +120,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++ { go wait.Until(c.runWorker, time.Second, stopCh) } @@ -199,7 +199,7 @@ func (c *Controller) processNextWorkItem() bool { return true } -// syncHandler compares the actual state with the desired, and attempts to +// reconcile compares the actual state with the desired, and attempts to // converge the two. It then updates the Status block of the Foo resource // with the current status of the resource. func (c *Controller) reconcile(key string) error { @@ -207,7 +207,7 @@ func (c *Controller) reconcile(key string) error { // Get the clusterRoleBinding with this name clusterRoleBinding, err := c.clusterRoleBindingLister.Get(key) if err != nil { - // The user may no longer exist, in which case we stop + // The resource may no longer exist, in which case we stop // processing. if errors.IsNotFound(err) { utilruntime.HandleError(fmt.Errorf("clusterrolebinding '%s' in work queue no longer exists", key)) diff --git a/pkg/controller/globalrole/globalrole_controller.go b/pkg/controller/globalrole/globalrole_controller.go index db1d687ad..15d0e2b1d 100644 --- a/pkg/controller/globalrole/globalrole_controller.go +++ b/pkg/controller/globalrole/globalrole_controller.go @@ -122,7 +122,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++ { go wait.Until(c.runWorker, time.Second, stopCh) } @@ -201,14 +201,14 @@ func (c *Controller) processNextWorkItem() bool { return true } -// syncHandler compares the actual state with the desired, and attempts to +// reconcile compares the actual state with the desired, and attempts to // converge the two. It then updates the Status block of the Foo resource // with the current status of the resource. func (c *Controller) reconcile(key string) error { globalRole, err := c.globalRoleLister.Get(key) if err != nil { - // The user may no longer exist, in which case we stop + // The resource may no longer exist, in which case we stop // processing. if errors.IsNotFound(err) { utilruntime.HandleError(fmt.Errorf("globalrole '%s' in work queue no longer exists", key)) diff --git a/pkg/controller/globalrolebinding/globalrolebinding_controller.go b/pkg/controller/globalrolebinding/globalrolebinding_controller.go index 3c305f8cd..b4d7ea34c 100644 --- a/pkg/controller/globalrolebinding/globalrolebinding_controller.go +++ b/pkg/controller/globalrolebinding/globalrolebinding_controller.go @@ -136,7 +136,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++ { go wait.Until(c.runWorker, time.Second, stopCh) } @@ -215,14 +215,14 @@ func (c *Controller) processNextWorkItem() bool { return true } -// syncHandler compares the actual state with the desired, and attempts to +// reconcile compares the actual state with the desired, and attempts to // converge the two. It then updates the Status block of the Foo resource // with the current status of the resource. func (c *Controller) reconcile(key string) error { globalRoleBinding, err := c.globalRoleBindingLister.Get(key) if err != nil { - // The user may no longer exist, in which case we stop + // The resource may no longer exist, in which case we stop // processing. if errors.IsNotFound(err) { utilruntime.HandleError(fmt.Errorf("globalrolebinding '%s' in work queue no longer exists", key)) diff --git a/pkg/controller/notification/notification_controller.go b/pkg/controller/notification/notification_controller.go index 8a02c227e..cb3c71d5a 100644 --- a/pkg/controller/notification/notification_controller.go +++ b/pkg/controller/notification/notification_controller.go @@ -157,7 +157,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++ { go wait.Until(c.runWorker, time.Second, stopCh) } @@ -214,7 +214,7 @@ func (c *Controller) processNextWorkItem() bool { return true } -// syncHandler compares the actual state with the desired, and attempts to +// reconcile compares the actual state with the desired, and attempts to // converge the two. It then updates the Status block of the Foo resource // with the current status of the resource. func (c *Controller) reconcile(obj interface{}) error { @@ -252,7 +252,7 @@ func (c *Controller) reconcile(obj interface{}) error { err := c.Get(context.Background(), client.ObjectKey{Name: runtimeObj.GetName(), Namespace: runtimeObj.GetNamespace()}, runtimeObj) if err != nil { - // The user may no longer exist, in which case we stop + // The resource may no longer exist, in which case we stop // processing. if errors.IsNotFound(err) { utilruntime.HandleError(fmt.Errorf("obj '%s' in work queue no longer exists", name))