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
eb1c453a
Commit
eb1c453a
authored
Apr 03, 2015
by
Vishnu Kannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating kube-proxy logging levels to assist debugging.
parent
3d1dfd47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
proxier.go
pkg/proxy/proxier.go
+1
-1
roundrobin.go
pkg/proxy/roundrobin.go
+3
-3
No files found.
pkg/proxy/proxier.go
View file @
eb1c453a
...
@@ -360,7 +360,7 @@ func (proxier *Proxier) SyncLoop() {
...
@@ -360,7 +360,7 @@ func (proxier *Proxier) SyncLoop() {
for
{
for
{
select
{
select
{
case
<-
time
.
After
(
syncInterval
)
:
case
<-
time
.
After
(
syncInterval
)
:
glog
.
V
(
2
)
.
Infof
(
"Periodic sync"
)
glog
.
V
(
3
)
.
Infof
(
"Periodic sync"
)
if
err
:=
iptablesInit
(
proxier
.
iptables
);
err
!=
nil
{
if
err
:=
iptablesInit
(
proxier
.
iptables
);
err
!=
nil
{
glog
.
Errorf
(
"Failed to ensure iptables: %v"
,
err
)
glog
.
Errorf
(
"Failed to ensure iptables: %v"
,
err
)
}
}
...
...
pkg/proxy/roundrobin.go
View file @
eb1c453a
...
@@ -214,7 +214,7 @@ func (lb *LoadBalancerRR) updateAffinityMap(svcPort ServicePortName, newEndpoint
...
@@ -214,7 +214,7 @@ func (lb *LoadBalancerRR) updateAffinityMap(svcPort ServicePortName, newEndpoint
}
}
for
mKey
,
mVal
:=
range
allEndpoints
{
for
mKey
,
mVal
:=
range
allEndpoints
{
if
mVal
==
1
{
if
mVal
==
1
{
glog
.
V
(
3
)
.
Infof
(
"Delete endpoint %s for service %q"
,
mKey
,
svcPort
)
glog
.
V
(
2
)
.
Infof
(
"Delete endpoint %s for service %q"
,
mKey
,
svcPort
)
removeSessionAffinityByEndpoint
(
state
,
svcPort
,
mKey
)
removeSessionAffinityByEndpoint
(
state
,
svcPort
,
mKey
)
}
}
}
}
...
@@ -257,7 +257,7 @@ func (lb *LoadBalancerRR) OnUpdate(allEndpoints []api.Endpoints) {
...
@@ -257,7 +257,7 @@ func (lb *LoadBalancerRR) OnUpdate(allEndpoints []api.Endpoints) {
newEndpoints
:=
flattenValidEndpoints
(
portsToEndpoints
[
portname
])
newEndpoints
:=
flattenValidEndpoints
(
portsToEndpoints
[
portname
])
if
!
exists
||
state
==
nil
||
len
(
curEndpoints
)
!=
len
(
newEndpoints
)
||
!
slicesEquiv
(
slice
.
CopyStrings
(
curEndpoints
),
newEndpoints
)
{
if
!
exists
||
state
==
nil
||
len
(
curEndpoints
)
!=
len
(
newEndpoints
)
||
!
slicesEquiv
(
slice
.
CopyStrings
(
curEndpoints
),
newEndpoints
)
{
glog
.
V
(
3
)
.
Infof
(
"LoadBalancerRR: Setting endpoints for %s to %+v"
,
svcPort
,
newEndpoints
)
glog
.
V
(
1
)
.
Infof
(
"LoadBalancerRR: Setting endpoints for %s to %+v"
,
svcPort
,
newEndpoints
)
lb
.
updateAffinityMap
(
svcPort
,
newEndpoints
)
lb
.
updateAffinityMap
(
svcPort
,
newEndpoints
)
// OnUpdate can be called without NewService being called externally.
// OnUpdate can be called without NewService being called externally.
// To be safe we will call it here. A new service will only be created
// To be safe we will call it here. A new service will only be created
...
@@ -274,7 +274,7 @@ func (lb *LoadBalancerRR) OnUpdate(allEndpoints []api.Endpoints) {
...
@@ -274,7 +274,7 @@ func (lb *LoadBalancerRR) OnUpdate(allEndpoints []api.Endpoints) {
// Remove endpoints missing from the update.
// Remove endpoints missing from the update.
for
k
:=
range
lb
.
services
{
for
k
:=
range
lb
.
services
{
if
_
,
exists
:=
registeredEndpoints
[
k
];
!
exists
{
if
_
,
exists
:=
registeredEndpoints
[
k
];
!
exists
{
glog
.
V
(
3
)
.
Infof
(
"LoadBalancerRR: Removing endpoints for %s"
,
k
)
glog
.
V
(
2
)
.
Infof
(
"LoadBalancerRR: Removing endpoints for %s"
,
k
)
delete
(
lb
.
services
,
k
)
delete
(
lb
.
services
,
k
)
}
}
}
}
...
...
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