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
528bc97d
Commit
528bc97d
authored
Oct 27, 2016
by
Vincent Heet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change stickyMaxAge from seconds to minutes, fixes issue #35677
parent
1b62e4c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
proxier.go
pkg/proxy/iptables/proxier.go
+3
-3
proxier_test.go
pkg/proxy/iptables/proxier_test.go
+1
-1
No files found.
pkg/proxy/iptables/proxier.go
View file @
528bc97d
...
...
@@ -137,7 +137,7 @@ type serviceInfo struct {
nodePort
int
loadBalancerStatus
api
.
LoadBalancerStatus
sessionAffinityType
api
.
ServiceAffinity
stickyMaxAge
Second
s
int
stickyMaxAge
Minute
s
int
externalIPs
[]
string
loadBalancerSourceRanges
[]
string
onlyNodeLocalEndpoints
bool
...
...
@@ -154,7 +154,7 @@ type endpointsInfo struct {
func
newServiceInfo
(
service
proxy
.
ServicePortName
)
*
serviceInfo
{
return
&
serviceInfo
{
sessionAffinityType
:
api
.
ServiceAffinityNone
,
// default
stickyMaxAge
Second
s
:
180
,
// TODO: paramaterize this in the API.
stickyMaxAge
Minute
s
:
180
,
// TODO: paramaterize this in the API.
}
}
...
...
@@ -1140,7 +1140,7 @@ func (proxier *Proxier) syncProxyRules() {
"-A"
,
string
(
svcChain
),
"-m"
,
"comment"
,
"--comment"
,
svcName
.
String
(),
"-m"
,
"recent"
,
"--name"
,
string
(
endpointChain
),
"--rcheck"
,
"--seconds"
,
fmt
.
Sprintf
(
"%d"
,
svcInfo
.
stickyMaxAge
Seconds
),
"--reap"
,
"--rcheck"
,
"--seconds"
,
fmt
.
Sprintf
(
"%d"
,
svcInfo
.
stickyMaxAge
Minutes
*
60
),
"--reap"
,
"-j"
,
string
(
endpointChain
))
}
}
...
...
pkg/proxy/iptables/proxier_test.go
View file @
528bc97d
...
...
@@ -260,7 +260,7 @@ func TestExecConntrackTool(t *testing.T) {
func
newFakeServiceInfo
(
service
proxy
.
ServicePortName
,
ip
net
.
IP
,
protocol
api
.
Protocol
,
onlyNodeLocalEndpoints
bool
)
*
serviceInfo
{
return
&
serviceInfo
{
sessionAffinityType
:
api
.
ServiceAffinityNone
,
// default
stickyMaxAge
Second
s
:
180
,
// TODO: paramaterize this in the API.
stickyMaxAge
Minute
s
:
180
,
// TODO: paramaterize this in the API.
clusterIP
:
ip
,
protocol
:
protocol
,
onlyNodeLocalEndpoints
:
onlyNodeLocalEndpoints
,
...
...
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