Skip to content

Commit 3f3aea1

Browse files
committed
fix: enable switch available during cluster join
Signed-off-by: ONE7live <[email protected]>
1 parent 37cb260 commit 3f3aea1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/clusterlink/clusterlink-operator/operator_controller.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (
138138
//}
139139

140140
cluster := &v1alpha1.Cluster{}
141-
142141
if err := r.Client.Get(ctx, request.NamespacedName, cluster); err != nil {
143142
// The resource may no longer exist, in which case we stop processing.
144143
if apierrors.IsNotFound(err) {
@@ -154,5 +153,10 @@ func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (
154153
}
155154
}
156155

156+
if !cluster.Spec.ClusterLinkOptions.Enable {
157+
klog.Infof("cluster %v does not have the clusterlink module enabled, skipping this event.", cluster.Name)
158+
return reconcile.Result{}, nil
159+
}
160+
157161
return r.syncCluster(cluster)
158162
}

0 commit comments

Comments
 (0)