Improve Unreasonable Comments (#5674)

Signed-off-by: sologgfun <857949825@qq.com>
This commit is contained in:
AS!
2023-05-12 10:30:48 +08:00
committed by GitHub
parent fafe98b4f0
commit 967861ff63
5 changed files with 15 additions and 15 deletions

View File

@@ -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))

View File

@@ -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))

View File

@@ -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))

View File

@@ -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))

View File

@@ -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))