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
e2eaccb8
Commit
e2eaccb8
authored
Feb 05, 2018
by
Pengfei Ni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure public IP removed after service deleted
parent
551f73d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
azure_loadbalancer.go
pkg/cloudprovider/providers/azure/azure_loadbalancer.go
+4
-2
No files found.
pkg/cloudprovider/providers/azure/azure_loadbalancer.go
View file @
e2eaccb8
...
@@ -383,10 +383,12 @@ func (az *Cloud) findServiceIPAddress(clusterName string, service *v1.Service, i
...
@@ -383,10 +383,12 @@ func (az *Cloud) findServiceIPAddress(clusterName string, service *v1.Service, i
return
""
,
err
return
""
,
err
}
}
if
!
existsLb
{
if
!
existsLb
{
return
""
,
fmt
.
Errorf
(
"Expected to find an IP address for service %s but did not"
,
service
.
Name
)
glog
.
V
(
2
)
.
Infof
(
"Expected to find an IP address for service %s but did not. Assuming it has been removed"
,
service
.
Name
)
return
""
,
nil
}
}
if
len
(
lbStatus
.
Ingress
)
<
1
{
if
len
(
lbStatus
.
Ingress
)
<
1
{
return
""
,
fmt
.
Errorf
(
"Expected to find an IP address for service %s but it had no ingresses"
,
service
.
Name
)
glog
.
V
(
2
)
.
Infof
(
"Expected to find an IP address for service %s but it had no ingresses. Assuming it has been removed"
,
service
.
Name
)
return
""
,
nil
}
}
return
lbStatus
.
Ingress
[
0
]
.
IP
,
nil
return
lbStatus
.
Ingress
[
0
]
.
IP
,
nil
...
...
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