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
7682e272
Commit
7682e272
authored
Jan 31, 2018
by
Pengfei Ni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure IP is set for Azure internal loadbalancer
parent
84408378
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
azure_loadbalancer.go
pkg/cloudprovider/providers/azure/azure_loadbalancer.go
+13
-0
azure_wrap.go
pkg/cloudprovider/providers/azure/azure_wrap.go
+16
-0
No files found.
pkg/cloudprovider/providers/azure/azure_loadbalancer.go
View file @
7682e272
...
@@ -772,6 +772,19 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
...
@@ -772,6 +772,19 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
glog
.
V
(
2
)
.
Infof
(
"ensure(%s) abort backoff: lb(%s) - updating"
,
serviceName
,
lbName
)
glog
.
V
(
2
)
.
Infof
(
"ensure(%s) abort backoff: lb(%s) - updating"
,
serviceName
,
lbName
)
return
nil
,
err
return
nil
,
err
}
}
if
isInternal
{
// Refresh updated lb which will be used later in other places.
newLB
,
exist
,
err
:=
az
.
getAzureLoadBalancer
(
lbName
)
if
err
!=
nil
{
glog
.
V
(
2
)
.
Infof
(
"getAzureLoadBalancer(%s) failed: %v"
,
lbName
,
err
)
return
nil
,
err
}
if
!
exist
{
return
nil
,
fmt
.
Errorf
(
"load balancer %q not found"
,
lbName
)
}
lb
=
&
newLB
}
}
}
}
}
...
...
pkg/cloudprovider/providers/azure/azure_wrap.go
View file @
7682e272
...
@@ -173,3 +173,19 @@ func (az *Cloud) getSubnet(virtualNetworkName string, subnetName string) (subnet
...
@@ -173,3 +173,19 @@ func (az *Cloud) getSubnet(virtualNetworkName string, subnetName string) (subnet
return
subnet
,
exists
,
err
return
subnet
,
exists
,
err
}
}
func
(
az
*
Cloud
)
getAzureLoadBalancer
(
name
string
)
(
lb
network
.
LoadBalancer
,
exists
bool
,
err
error
)
{
var
realErr
error
lb
,
err
=
az
.
LoadBalancerClient
.
Get
(
az
.
ResourceGroup
,
name
,
""
)
exists
,
realErr
=
checkResourceExistsFromError
(
err
)
if
realErr
!=
nil
{
return
lb
,
false
,
realErr
}
if
!
exists
{
return
lb
,
false
,
nil
}
return
lb
,
exists
,
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