From 3c862880b2295b4b0e4821ff0ffffb2ac44ff4dd Mon Sep 17 00:00:00 2001 From: OrangeBao Date: Wed, 6 Dec 2023 14:07:01 +0800 Subject: [PATCH] fix: add daemonset filter Signed-off-by: OrangeBao --- .../cluster-manager/controllers/pod/root_pod_controller.go | 2 -- pkg/clustertree/cluster-manager/utils/rootcluster.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/clustertree/cluster-manager/controllers/pod/root_pod_controller.go b/pkg/clustertree/cluster-manager/controllers/pod/root_pod_controller.go index 11b7bb3df..fad5cd07c 100644 --- a/pkg/clustertree/cluster-manager/controllers/pod/root_pod_controller.go +++ b/pkg/clustertree/cluster-manager/controllers/pod/root_pod_controller.go @@ -237,7 +237,6 @@ func (r *RootPodReconciler) SetupWithManager(mgr manager.Manager) error { return false } - /** p := obj.(*corev1.Pod) // skip daemonset @@ -253,7 +252,6 @@ func (r *RootPodReconciler) SetupWithManager(mgr manager.Manager) error { } } } - */ return true } diff --git a/pkg/clustertree/cluster-manager/utils/rootcluster.go b/pkg/clustertree/cluster-manager/utils/rootcluster.go index 0feabcb01..3707ffbee 100644 --- a/pkg/clustertree/cluster-manager/utils/rootcluster.go +++ b/pkg/clustertree/cluster-manager/utils/rootcluster.go @@ -36,7 +36,7 @@ func GetAddress(ctx context.Context, rootClient kubernetes.Interface, originAddr } prefixAddress := []corev1.NodeAddress{ - {Type: preferredAddressType, Address: os.Getenv("KNODE_POD_IP")}, + {Type: preferredAddressType, Address: os.Getenv("LEAF_NODE_IP")}, } address, err := SortAddress(ctx, rootClient, originAddress)