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
c69cea41
Commit
c69cea41
authored
Apr 20, 2018
by
Pengfei Ni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check all backends for vmss and standard instances
parent
efb7ae6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
azure_standard.go
pkg/cloudprovider/providers/azure/azure_standard.go
+9
-7
azure_vmss.go
pkg/cloudprovider/providers/azure/azure_vmss.go
+11
-9
No files found.
pkg/cloudprovider/providers/azure/azure_standard.go
View file @
c69cea41
...
...
@@ -630,13 +630,15 @@ func (as *availabilitySet) ensureHostInPool(serviceName string, nodeName types.N
// sets, the same network interface couldn't be added to more than one load balancer of
// the same type. Omit those nodes (e.g. masters) so Azure ARM won't complain
// about this.
backendPool
:=
*
newBackendPools
[
0
]
.
ID
matches
:=
backendPoolIDRE
.
FindStringSubmatch
(
backendPool
)
if
len
(
matches
)
==
2
{
lbName
:=
matches
[
1
]
if
strings
.
HasSuffix
(
lbName
,
InternalLoadBalancerNameSuffix
)
==
isInternal
{
glog
.
V
(
4
)
.
Infof
(
"Node %q has already been added to LB %q, omit adding it to a new one"
,
nodeName
,
lbName
)
return
nil
for
_
,
pool
:=
range
newBackendPools
{
backendPool
:=
*
pool
.
ID
matches
:=
backendPoolIDRE
.
FindStringSubmatch
(
backendPool
)
if
len
(
matches
)
==
2
{
lbName
:=
matches
[
1
]
if
strings
.
HasSuffix
(
lbName
,
InternalLoadBalancerNameSuffix
)
==
isInternal
{
glog
.
V
(
4
)
.
Infof
(
"Node %q has already been added to LB %q, omit adding it to a new one"
,
nodeName
,
lbName
)
return
nil
}
}
}
}
...
...
pkg/cloudprovider/providers/azure/azure_vmss.go
View file @
c69cea41
...
...
@@ -627,13 +627,15 @@ func (ss *scaleSet) ensureHostsInVMSetPool(serviceName string, backendPoolID str
// the same network interface couldn't be added to more than one load balancer of
// the same type. Omit those nodes (e.g. masters) so Azure ARM won't complain
// about this.
backendPool
:=
*
newBackendPools
[
0
]
.
ID
matches
:=
backendPoolIDRE
.
FindStringSubmatch
(
backendPool
)
if
len
(
matches
)
==
2
{
lbName
:=
matches
[
1
]
if
strings
.
HasSuffix
(
lbName
,
InternalLoadBalancerNameSuffix
)
==
isInternal
{
glog
.
V
(
4
)
.
Infof
(
"vmss %q has already been added to LB %q, omit adding it to a new one"
,
vmSetName
,
lbName
)
return
nil
for
_
,
pool
:=
range
newBackendPools
{
backendPool
:=
*
pool
.
ID
matches
:=
backendPoolIDRE
.
FindStringSubmatch
(
backendPool
)
if
len
(
matches
)
==
2
{
lbName
:=
matches
[
1
]
if
strings
.
HasSuffix
(
lbName
,
InternalLoadBalancerNameSuffix
)
==
isInternal
{
glog
.
V
(
4
)
.
Infof
(
"vmss %q has already been added to LB %q, omit adding it to a new one"
,
vmSetName
,
lbName
)
return
nil
}
}
}
}
...
...
@@ -696,7 +698,7 @@ func (ss *scaleSet) EnsureHostsInPool(serviceName string, nodes []*v1.Node, back
for
ssName
,
instanceIDs
:=
range
scalesets
{
// Only add nodes belonging to specified vmSet to basic LB backends.
if
!
ss
.
useStandardLoadBalancer
()
&&
ssName
!=
vmSetName
{
if
!
ss
.
useStandardLoadBalancer
()
&&
!
strings
.
EqualFold
(
ssName
,
vmSetName
)
{
continue
}
...
...
@@ -859,7 +861,7 @@ func (ss *scaleSet) EnsureBackendPoolDeleted(poolID, vmSetName string, backendAd
for
ssName
:=
range
scalesets
{
// Only remove nodes belonging to specified vmSet to basic LB backends.
if
!
ss
.
useStandardLoadBalancer
()
&&
ssName
!=
vmSetName
{
if
!
ss
.
useStandardLoadBalancer
()
&&
!
strings
.
EqualFold
(
ssName
,
vmSetName
)
{
continue
}
...
...
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