diff --git a/pkg/clusterlink/network-manager/network_manager.go b/pkg/clusterlink/network-manager/network_manager.go index e2d8a9064..e3d2c2e89 100644 --- a/pkg/clusterlink/network-manager/network_manager.go +++ b/pkg/clusterlink/network-manager/network_manager.go @@ -28,6 +28,12 @@ func ExcludeInvalidItems(clusters []v1alpha1.Cluster, clusterNodes []v1alpha1.Cl klog.Infof("the cluster %s's ClusterLinkOptions is empty, will exclude.", c.Name) continue } + + if !c.Spec.ClusterLinkOptions.Enable { + klog.Infof("the cluster %s's ClusterLinkOptions is enable, will exclude.", c.Name) + continue + } + clustersMap[c.Name] = c cs = append(cs, c) }