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

Commit 1323570

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request #54176 from gonzolino/os-lbaas-provider
Automatic merge from submit-queue. 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>. Make OpenStack LBaaS v2 Provider configurable Add option 'lb-provider' to the Loadbalancer section of the OpenStack cloudprovider configuration to allow using a different LBaaS v2 provider than the default. **What this PR does / why we need it**: This PR allows to use a different OpenStack LBaaS v2 provider than the default of the OpenStack cloud. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note Added option lb-provider to OpenStack cloud provider config ```
2 parents 4662e09 + 4af97b0 commit 1323570

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/cloudprovider/providers/openstack/openstack.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ type LoadBalancerOpts struct {
8282
SubnetId string `gcfg:"subnet-id"` // overrides autodetection.
8383
FloatingNetworkId string `gcfg:"floating-network-id"` // If specified, will create floating ip for loadbalancer, or do not create floating ip.
8484
LBMethod string `gcfg:"lb-method"` // default to ROUND_ROBIN.
85+
LBProvider string `gcfg:"lb-provider"`
8586
CreateMonitor bool `gcfg:"create-monitor"`
8687
MonitorDelay MyDuration `gcfg:"monitor-delay"`
8788
MonitorTimeout MyDuration `gcfg:"monitor-timeout"`

pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ func (lbaas *LbaasV2) createLoadBalancer(service *v1.Service, name string, inter
515515
Name: name,
516516
Description: fmt.Sprintf("Kubernetes external service %s", name),
517517
VipSubnetID: lbaas.opts.SubnetId,
518+
Provider: lbaas.opts.LBProvider,
518519
}
519520

520521
loadBalancerIP := service.Spec.LoadBalancerIP

pkg/cloudprovider/providers/openstack/openstack_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ func TestCheckOpenStackOpts(t *testing.T) {
169169
SubnetId: "6261548e-ffde-4bc7-bd22-59c83578c5ef",
170170
FloatingNetworkId: "38b8b5f9-64dc-4424-bf86-679595714786",
171171
LBMethod: "ROUND_ROBIN",
172+
LBProvider: "haproxy",
172173
CreateMonitor: true,
173174
MonitorDelay: delay,
174175
MonitorTimeout: timeout,

0 commit comments

Comments
 (0)