mirror of https://github.com/k3s-io/k3s
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 ```pull/6/head
commit
1213f9112b
|
@ -82,6 +82,7 @@ type LoadBalancerOpts struct {
|
|||
SubnetId string `gcfg:"subnet-id"` // overrides autodetection.
|
||||
FloatingNetworkId string `gcfg:"floating-network-id"` // If specified, will create floating ip for loadbalancer, or do not create floating ip.
|
||||
LBMethod string `gcfg:"lb-method"` // default to ROUND_ROBIN.
|
||||
LBProvider string `gcfg:"lb-provider"`
|
||||
CreateMonitor bool `gcfg:"create-monitor"`
|
||||
MonitorDelay MyDuration `gcfg:"monitor-delay"`
|
||||
MonitorTimeout MyDuration `gcfg:"monitor-timeout"`
|
||||
|
|
|
@ -515,6 +515,7 @@ func (lbaas *LbaasV2) createLoadBalancer(service *v1.Service, name string, inter
|
|||
Name: name,
|
||||
Description: fmt.Sprintf("Kubernetes external service %s", name),
|
||||
VipSubnetID: lbaas.opts.SubnetId,
|
||||
Provider: lbaas.opts.LBProvider,
|
||||
}
|
||||
|
||||
loadBalancerIP := service.Spec.LoadBalancerIP
|
||||
|
|
|
@ -169,6 +169,7 @@ func TestCheckOpenStackOpts(t *testing.T) {
|
|||
SubnetId: "6261548e-ffde-4bc7-bd22-59c83578c5ef",
|
||||
FloatingNetworkId: "38b8b5f9-64dc-4424-bf86-679595714786",
|
||||
LBMethod: "ROUND_ROBIN",
|
||||
LBProvider: "haproxy",
|
||||
CreateMonitor: true,
|
||||
MonitorDelay: delay,
|
||||
MonitorTimeout: timeout,
|
||||
|
|
Loading…
Reference in New Issue