Skip to content

Commit

Permalink
fix: enable switch available during cluster join
Browse files Browse the repository at this point in the history
Signed-off-by: ONE7live <[email protected]>
  • Loading branch information
ONE7live committed Nov 20, 2024
1 parent 37cb260 commit 3f3aea1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/clusterlink/clusterlink-operator/operator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (
//}

cluster := &v1alpha1.Cluster{}

if err := r.Client.Get(ctx, request.NamespacedName, cluster); err != nil {
// The resource may no longer exist, in which case we stop processing.
if apierrors.IsNotFound(err) {
Expand All @@ -154,5 +153,10 @@ func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (
}
}

if !cluster.Spec.ClusterLinkOptions.Enable {
klog.Infof("cluster %v does not have the clusterlink module enabled, skipping this event.", cluster.Name)
return reconcile.Result{}, nil
}

return r.syncCluster(cluster)
}

0 comments on commit 3f3aea1

Please sign in to comment.