Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit 2ec6023

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request #53101 from FengyunPan/default-external
Automatic merge from submit-queue (batch tested with PRs 53101, 53158, 52165). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. [OpenStack] Service LoadBalancer defaults to external **What this PR does / why we need it**: Let "service.beta.kubernetes.io/openstack-internal-load-balancer" default to false. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53078 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
2 parents ba83c3f + def57ce commit 2ec6023

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const (
7171

7272
// ServiceAnnotationLoadBalancerInternal is the annotation used on the service
7373
// to indicate that we want an internal loadbalancer service.
74-
// If the value of ServiceAnnotationLoadBalancerInternal is false, it indicates that we want an external loadbalancer service. Default to true.
74+
// If the value of ServiceAnnotationLoadBalancerInternal is false, it indicates that we want an external loadbalancer service. Default to false.
7575
ServiceAnnotationLoadBalancerInternal = "service.beta.kubernetes.io/openstack-internal-load-balancer"
7676
)
7777

@@ -644,7 +644,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(clusterName string, apiService *v1.Serv
644644
glog.V(4).Infof("EnsureLoadBalancer using floatingPool: %v", floatingPool)
645645

646646
var internalAnnotation bool
647-
internal := getStringFromServiceAnnotation(apiService, ServiceAnnotationLoadBalancerInternal, "true")
647+
internal := getStringFromServiceAnnotation(apiService, ServiceAnnotationLoadBalancerInternal, "false")
648648
switch internal {
649649
case "true":
650650
glog.V(4).Infof("Ensure an internal loadbalancer service.")
@@ -654,7 +654,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(clusterName string, apiService *v1.Serv
654654
glog.V(4).Infof("Ensure an external loadbalancer service.")
655655
internalAnnotation = false
656656
} else {
657-
return nil, fmt.Errorf("floating-network-id or loadbalancer.openstack.org/floating-network-id should be specified when service.beta.kubernetes.io/openstack-internal-load-balancer is false")
657+
return nil, fmt.Errorf("floating-network-id or loadbalancer.openstack.org/floating-network-id should be specified when ensuring an external loadbalancer service.")
658658
}
659659
default:
660660
return nil, fmt.Errorf("unknow service.beta.kubernetes.io/openstack-internal-load-balancer annotation: %v, specify \"true\" or \"false\".",
@@ -1338,7 +1338,7 @@ func (lb *LbaasV1) EnsureLoadBalancer(clusterName string, apiService *v1.Service
13381338
glog.V(4).Infof("EnsureLoadBalancer using floatingPool: %v", floatingPool)
13391339

13401340
var internalAnnotation bool
1341-
internal := getStringFromServiceAnnotation(apiService, ServiceAnnotationLoadBalancerInternal, "true")
1341+
internal := getStringFromServiceAnnotation(apiService, ServiceAnnotationLoadBalancerInternal, "false")
13421342
switch internal {
13431343
case "true":
13441344
glog.V(4).Infof("Ensure an internal loadbalancer service.")
@@ -1348,7 +1348,7 @@ func (lb *LbaasV1) EnsureLoadBalancer(clusterName string, apiService *v1.Service
13481348
glog.V(4).Infof("Ensure an external loadbalancer service.")
13491349
internalAnnotation = false
13501350
} else {
1351-
return nil, fmt.Errorf("floating-network-id or loadbalancer.openstack.org/floating-network-id should be specified when service.beta.kubernetes.io/openstack-internal-load-balancer is false")
1351+
return nil, fmt.Errorf("floating-network-id or loadbalancer.openstack.org/floating-network-id should be specified when ensuring an external loadbalancer service.")
13521352
}
13531353
default:
13541354
return nil, fmt.Errorf("unknow service.beta.kubernetes.io/openstack-internal-load-balancer annotation: %v, specify \"true\" or \"false\".",

0 commit comments

Comments
 (0)