Skip to content

Commit 2f732d8

Browse files
author
Lake Mei
committed
fix: allocatePort and correct spelling in README and proxy.go
1 parent e471c6b commit 2f732d8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ metadata:
8989
name: kind-test
9090
namespace: kubesphere-system
9191
annotations:
92-
tower.kubesphere.io/external-lb-service-annoations: '{"eip.porter.kubesphere.io/v1alpha2":"porter-bgp-eip","lb.kubesphere.io/v1alpha1":"porter","protocol.porter.kubesphere.io/v1alpha1":"bgp"}'
92+
tower.kubesphere.io/external-lb-service-annotations: '{"eip.porter.kubesphere.io/v1alpha2":"porter-bgp-eip","lb.kubesphere.io/v1alpha1":"porter","protocol.porter.kubesphere.io/v1alpha1":"bgp"}'
9393
spec:
9494
connection:
9595
type: proxy
@@ -98,4 +98,4 @@ spec:
9898
externalKubeAPIEnabled: true
9999
```
100100

101-
With `externalKubeAPIEnabled=true` and `connection.type=proxy` tower will create the serivce with `LoadBlancer` type, content in annotation with key `tower.kubesphere.io/external-lb-service-annoations` will be applied to the service anntations as k-v, so that your can control how the `ccm` process the service.
101+
With `externalKubeAPIEnabled=true` and `connection.type=proxy` tower will create the serivce with `LoadBlancer` type, content in annotation with key `tower.kubesphere.io/external-lb-service-annotations` will be applied to the service anntations as k-v, so that your can control how the `ccm` process the service.

pkg/proxy/proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ func (s *Proxy) addCluster(cluster *v1alpha1.Cluster) error {
583583

584584
func updateServiceByExternalKubeAPI(cluster *v1alpha1.Cluster, service *corev1.Service) {
585585
// get lb annotations from cluster annotations
586-
externalLBAnnotations, ok := cluster.Annotations["tower.kubesphere.io/external-lb-service-annoations"]
586+
externalLBAnnotations, ok := cluster.Annotations["tower.kubesphere.io/external-lb-service-annotations"]
587587
if ok {
588588
var annotation map[string]string
589589
if err := json.Unmarshal([]byte(externalLBAnnotations), &annotation); err != nil {
@@ -717,7 +717,7 @@ func (s *Proxy) allocatePort() (uint16, error) {
717717
for _, item := range clusters.Items {
718718
if item.Spec.Connection.Type == v1alpha1.ConnectionTypeProxy &&
719719
item.Spec.Connection.KubernetesAPIServerPort != 0 &&
720-
item.Spec.Connection.KubeSphereAPIServerPort == port {
720+
item.Spec.Connection.KubernetesAPIServerPort == port {
721721
collision = true
722722
break
723723
}

0 commit comments

Comments
 (0)