Skip to content

Commit d889301

Browse files
committed
fix: redundant creation of leaf node
Signed-off-by: ONE7live <[email protected]>
1 parent ff2019f commit d889301

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/clustertree/cluster-manager/cluster_controller.go

+5
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ func (c *ClusterController) Reconcile(ctx context.Context, request reconcile.Req
177177
return reconcile.Result{}, nil
178178
}
179179

180+
if !cluster.Spec.ClusterTreeOptions.Enable {
181+
klog.Infof("Cluster %s does not have the ClusterTree module enabled, skipping this event.", request.Name)
182+
return reconcile.Result{}, nil
183+
}
184+
180185
// build mgr for cluster
181186
// TODO bug, the v4 log is lost
182187
mgr, err := controllerruntime.NewManager(config, controllerruntime.Options{

0 commit comments

Comments
 (0)