Skip to content

Commit

Permalink
Merge pull request #754 from OrangeBao/release_v0.5.4_eps
Browse files Browse the repository at this point in the history
fix: don't update anp eps when api use nodeport
  • Loading branch information
duanmengkk authored Oct 31, 2024
2 parents 846d7a0 + ce3df3b commit 6d430b0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (e *KonnectivityController) SyncVirtualClusterEPS(ctx context.Context, k8sC
return fmt.Errorf("eps %s has no subsets", eps.Name)
}

// only sync the port of the konnectivity-server endpoints
// only sync the address of the konnectivity-server endpoints
targetPort := virtualEndPoints.Subsets[0].Ports[0].Port
updateEPS := virtualEndPoints.DeepCopy()

Expand Down Expand Up @@ -124,6 +124,10 @@ func (e *KonnectivityController) Reconcile(ctx context.Context, request reconcil
return reconcile.Result{RequeueAfter: utils.DefaultRequeueTime}, nil
}

if targetVirtualCluster.Spec.KubeInKubeConfig != nil && targetVirtualCluster.Spec.KubeInKubeConfig.APIServerServiceType == v1alpha1.NodePort {
return reconcile.Result{}, nil
}

k8sClient, err := util.GenerateKubeclient(targetVirtualCluster)
if err != nil {
klog.Errorf("virtualcluster %s crd kubernetes client failed: %v", targetVirtualCluster.Name, err)
Expand Down

0 comments on commit 6d430b0

Please sign in to comment.