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
6aa784e6
Commit
6aa784e6
authored
Dec 19, 2016
by
Dan Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proxy/iptables: don't sync proxy rules if services map didn't change
parent
433f6830
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
proxier.go
pkg/proxy/iptables/proxier.go
+7
-3
No files found.
pkg/proxy/iptables/proxier.go
View file @
6aa784e6
...
...
@@ -556,8 +556,6 @@ func (proxier *Proxier) OnServiceUpdate(allServices []api.Service) {
proxier
.
haveReceivedServiceUpdate
=
true
newServiceMap
,
hcAdd
,
hcDel
,
staleUDPServices
:=
buildServiceMap
(
allServices
,
proxier
.
serviceMap
)
proxier
.
serviceMap
=
newServiceMap
for
_
,
hc
:=
range
hcAdd
{
glog
.
V
(
4
)
.
Infof
(
"Adding health check for %+v, port %v"
,
hc
.
namespace
,
hc
.
nodeport
)
// Turn on healthcheck responder to listen on the health check nodePort
...
...
@@ -572,7 +570,13 @@ func (proxier *Proxier) OnServiceUpdate(allServices []api.Service) {
healthcheck
.
DeleteServiceListener
(
hc
.
namespace
,
hc
.
nodeport
)
}
proxier
.
syncProxyRules
()
if
len
(
newServiceMap
)
!=
len
(
proxier
.
serviceMap
)
||
!
reflect
.
DeepEqual
(
newServiceMap
,
proxier
.
serviceMap
)
{
proxier
.
serviceMap
=
newServiceMap
proxier
.
syncProxyRules
()
}
else
{
glog
.
V
(
4
)
.
Infof
(
"Skipping proxy iptables rule sync on service update because nothing changed"
)
}
proxier
.
deleteServiceConnections
(
staleUDPServices
.
List
())
}
...
...
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