Skip to content

Commit 21229cb

Browse files
authored
Merge pull request kosmos-io#753 from OrangeBao/main
fix: don't update anp eps when api use nodeport
2 parents c1a6430 + 67fce03 commit 21229cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/kubenest/controller/endpoints.sync.controller/konnectivity_sync_controller.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (e *KonnectivityController) SyncVirtualClusterEPS(ctx context.Context, k8sC
7373
return fmt.Errorf("eps %s has no subsets", eps.Name)
7474
}
7575

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

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

127+
if targetVirtualCluster.Spec.KubeInKubeConfig != nil && targetVirtualCluster.Spec.KubeInKubeConfig.APIServerServiceType == v1alpha1.NodePort {
128+
return reconcile.Result{}, nil
129+
}
130+
127131
k8sClient, err := util.GenerateKubeclient(targetVirtualCluster)
128132
if err != nil {
129133
klog.Errorf("virtualcluster %s crd kubernetes client failed: %v", targetVirtualCluster.Name, err)

0 commit comments

Comments
 (0)