Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
8818966d
Commit
8818966d
authored
Apr 23, 2015
by
Angus Lees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenStack: lb_method required when creating LbaaS pool
This change takes lb-method from [LoadBalancer] section of cloud provider config file, defaulting to ROUND_ROBIN. Fixes #7199
parent
162b0db7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
openstack.go
pkg/cloudprovider/openstack/openstack.go
+6
-0
No files found.
pkg/cloudprovider/openstack/openstack.go
View file @
8818966d
...
...
@@ -67,6 +67,7 @@ func (d *MyDuration) UnmarshalText(text []byte) error {
type
LoadBalancerOpts
struct
{
SubnetId
string
`gcfg:"subnet-id"`
// required
LBMethod
string
`gfcg:"lb-method"`
CreateMonitor
bool
`gcfg:"create-monitor"`
MonitorDelay
MyDuration
`gcfg:"monitor-delay"`
MonitorTimeout
MyDuration
`gcfg:"monitor-timeout"`
...
...
@@ -485,10 +486,15 @@ func (lb *LoadBalancer) CreateTCPLoadBalancer(name, region string, externalIP ne
return
""
,
fmt
.
Errorf
(
"unsupported load balancer affinity: %v"
,
affinity
)
}
lbmethod
:=
lb
.
opts
.
LBMethod
if
lbmethod
==
""
{
lbmethod
=
pools
.
LBMethodRoundRobin
}
pool
,
err
:=
pools
.
Create
(
lb
.
network
,
pools
.
CreateOpts
{
Name
:
name
,
Protocol
:
pools
.
ProtocolTCP
,
SubnetID
:
lb
.
opts
.
SubnetId
,
LBMethod
:
lbmethod
,
})
.
Extract
()
if
err
!=
nil
{
return
""
,
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment