From 7b90cf1cfbcc7ecf37b24c2df3f307b472abd327 Mon Sep 17 00:00:00 2001 From: duanmengkk Date: Mon, 20 Nov 2023 16:49:40 +0800 Subject: [PATCH] fix: fix the leaf node'cidr synced to root cluster Signed-off-by: duanmengkk --- .../controllers/node_resources_controller.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/clustertree/cluster-manager/controllers/node_resources_controller.go b/pkg/clustertree/cluster-manager/controllers/node_resources_controller.go index f6190d9f0..34cb67a96 100644 --- a/pkg/clustertree/cluster-manager/controllers/node_resources_controller.go +++ b/pkg/clustertree/cluster-manager/controllers/node_resources_controller.go @@ -146,8 +146,11 @@ func (c *NodeResourcesController) Reconcile(ctx context.Context, request reconci if node != nil { clone.Labels = mergeMap(clone.GetLabels(), node.GetLabels()) clone.Annotations = mergeMap(clone.GetAnnotations(), node.GetAnnotations()) - clone.Spec = node.Spec - clone.Spec.Taints = rootNode.Spec.Taints + spec := corev1.NodeSpec{ + Taints: rootNode.Spec.Taints, + } + + clone.Spec = spec clone.Status = node.Status clone.Status.Addresses = leafUtils.GetAddress() }