Skip to content

Commit

Permalink
Merge pull request #688 from OrangeBao/main
Browse files Browse the repository at this point in the history
fix: do not update konnectivity-server endpoints when len of subnet is 0
  • Loading branch information
duanmengkk authored Aug 22, 2024
2 parents cc9cda8 + 786a61d commit ef7d4f8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ func (e *KonnectivityController) SyncVirtualClusterEPS(ctx context.Context, k8sC
return fmt.Errorf("virtualcluster eps %s has no ports", constants.KonnectivityServerSuffix)
}

// fix bug: https://github.com/kosmos-io/kosmos/issues/683
if len(eps.Subsets) == 0 {
return fmt.Errorf("eps %s has no subsets", eps.Name)
}

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

0 comments on commit ef7d4f8

Please sign in to comment.