Skip to content

Commit

Permalink
fix: ignore errors of vc kubeconfig empty
Browse files Browse the repository at this point in the history
Signed-off-by: baoyinghai_yewu <[email protected]>
  • Loading branch information
OrangeBao committed May 29, 2024
1 parent db9253b commit 450990f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ func (r *NodeController) Reconcile(ctx context.Context, request reconcile.Reques
return reconcile.Result{}, nil
}

if len(virtualCluster.Spec.Kubeconfig) == 0 {
klog.Warning("virtualcluster.spec.kubeconfig is nil, wait virtualcluster control-plane ready.")
return reconcile.Result{}, nil
}

if err := r.DoNodeTask(ctx, virtualCluster); err != nil {
klog.Errorf("virtualcluster %s do node task failed: %v", virtualCluster.Name, err)
if err := r.UpdateVirtualClusterStatus(ctx, virtualCluster, v1alpha1.Pending, err.Error()); err != nil {
Expand Down

0 comments on commit 450990f

Please sign in to comment.