Skip to content

Commit

Permalink
update reconcile
Browse files Browse the repository at this point in the history
  • Loading branch information
gao12312 committed Nov 25, 2024
1 parent 6b500b5 commit f2db91b
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func (c *PodSyncController) updatePodStatus(ctx context.Context) error {
}
}(leafpod)
}

wg.Wait()
close(errChan)

Expand All @@ -146,22 +145,18 @@ func (c *PodSyncController) updatePodStatus(ctx context.Context) error {
taskErr = errors.Wrap(err, taskErr.Error())
}
}

if taskErr != nil {
return taskErr
}

return nil
}

func (c *PodSyncController) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error) {
klog.V(4).Infof("============ %s starts to reconcile %s ============", PodSyncControllerName, req.Name)

nodes, err := c.rootClient.CoreV1().Nodes().List(ctx, metav1.ListOptions{})
if err != nil {
return reconcile.Result{}, fmt.Errorf("could not list pods in root,Error: %v", err)
}

for i := range nodes.Items {
node := nodes.Items[i]
if !IsNodeReady(&node) {
Expand Down

0 comments on commit f2db91b

Please sign in to comment.