Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update
Browse files Browse the repository at this point in the history
gao12312 committed Dec 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 6a73fe0 commit c48e956
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -48,11 +48,11 @@ func (c *RootPodSyncReconciler) SetupWithManager(mgr manager.Manager) error {
},
UpdateFunc: func(updateEvent event.UpdateEvent) bool {
old := updateEvent.ObjectOld.(*corev1.Pod)
curr := updateEvent.ObjectNew.(*corev1.Pod)
new := updateEvent.ObjectNew.(*corev1.Pod)

Check failure on line 51 in pkg/clustertree/cluster-manager/controllers/pod/rootpodstatus_sync_controller.go

GitHub Actions / verify

redefines-builtin-id: redefinition of the built-in function new (revive)
if !skipFunc(updateEvent.ObjectNew) {
return false
}
return !reflect.DeepEqual(old.Status, curr.Status)
return !reflect.DeepEqual(old.Status, new.Status)
},
DeleteFunc: func(deleteEvent event.DeleteEvent) bool {
return false
@@ -110,11 +110,7 @@ func (c *RootPodSyncReconciler) Reconcile(ctx context.Context, request reconcile
rPodCopy.Status = leafPod.Status
podutils.FitObjectMeta(&rPodCopy.ObjectMeta)
if err := c.RootClient.Status().Update(ctx, rPodCopy); err != nil {
if apierrors.IsNotFound(err) {
klog.Errorf("rootpod %s not found while updating status", rootpod.Name)
} else {
klog.Errorf("error while updating rootpod status in kubernetes, %s", err)
}
klog.Errorf("error while updating rootpod status in kubernetes, %s", err)
return reconcile.Result{}, nil
}
klog.Infof("update rootpod %s status success", leafPod.Name)

0 comments on commit c48e956

Please sign in to comment.