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
25c9ac65
Unverified
Commit
25c9ac65
authored
Nov 30, 2018
by
k8s-ci-robot
Committed by
GitHub
Nov 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71515 from DataDog/lbernail/udp-graceful
Enable graceful termination for UDP flows when using kube-proxy in IPVS mode
parents
16c0f3ce
b11233a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
graceful_termination.go
pkg/proxy/ipvs/graceful_termination.go
+7
-4
proxier.go
pkg/proxy/ipvs/proxier.go
+1
-1
No files found.
pkg/proxy/ipvs/graceful_termination.go
View file @
25c9ac65
...
...
@@ -75,10 +75,10 @@ func (q *graceTerminateRSList) remove(rs *listItem) bool {
uniqueRS
:=
rs
.
String
()
if
_
,
ok
:=
q
.
list
[
uniqueRS
];
ok
{
return
false
delete
(
q
.
list
,
uniqueRS
)
return
true
}
delete
(
q
.
list
,
uniqueRS
)
return
true
return
false
}
func
(
q
*
graceTerminateRSList
)
flushList
(
handler
func
(
rsToDelete
*
listItem
)
(
bool
,
error
))
bool
{
...
...
@@ -164,7 +164,10 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e
}
for
_
,
rs
:=
range
rss
{
if
rsToDelete
.
RealServer
.
Equal
(
rs
)
{
if
rs
.
ActiveConn
!=
0
{
// Delete RS with no connections
// For UDP, ActiveConn is always 0
// For TCP, InactiveConn are connections not in ESTABLISHED state
if
rs
.
ActiveConn
+
rs
.
InactiveConn
!=
0
{
return
false
,
nil
}
klog
.
Infof
(
"Deleting rs: %s"
,
rsToDelete
.
String
())
...
...
pkg/proxy/ipvs/proxier.go
View file @
25c9ac65
...
...
@@ -1602,7 +1602,7 @@ func (proxier *Proxier) syncEndpoint(svcPortName proxy.ServicePortName, onlyNode
Port
:
uint16
(
portNum
),
}
klog
.
V
(
5
)
.
Infof
(
"Using graceful delete to delete: %v"
,
delDest
)
klog
.
V
(
5
)
.
Infof
(
"Using graceful delete to delete: %v"
,
uniqueRS
)
err
=
proxier
.
gracefuldeleteManager
.
GracefulDeleteRS
(
appliedVirtualServer
,
delDest
)
if
err
!=
nil
{
klog
.
Errorf
(
"Failed to delete destination: %v, error: %v"
,
delDest
,
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