diff --git a/pkg/clustertree/cluster-manager/utils/leaf_model_handler.go b/pkg/clustertree/cluster-manager/utils/leaf_model_handler.go index 132841c2d..66b592a3a 100644 --- a/pkg/clustertree/cluster-manager/utils/leaf_model_handler.go +++ b/pkg/clustertree/cluster-manager/utils/leaf_model_handler.go @@ -115,20 +115,10 @@ func (h AggregationModelHandler) UpdateNodeStatus(ctx context.Context, n []*core return err } - patch, err := utils.CreateMergePatch(node, clone) + clone.Status.Addresses = updateAddress - if err != nil { - return fmt.Errorf("cannot get node while update node status %s, err: %v", node.Name, err) - } - - if latestNode, err := h.RootClientset.CoreV1().Nodes().PatchStatus(ctx, node.Name, patch); err != nil { + if _, err = h.RootClientset.CoreV1().Nodes().UpdateStatus(ctx, clone, metav1.UpdateOptions{}); err != nil { return err - } else { - latestNode.ResourceVersion = "" - latestNode.Status.Addresses = updateAddress - if _, err = h.RootClientset.CoreV1().Nodes().UpdateStatus(ctx, latestNode, metav1.UpdateOptions{}); err != nil { - return err - } } return nil })