-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove hard code of session affinity timeout in winows kernel proxy #53634
Conversation
cc @madhanrm |
pkg/proxy/winkernel/proxier.go
Outdated
@@ -165,6 +165,10 @@ func newServiceInfo(svcPortName proxy.ServicePortName, port *api.ServicePort, se | |||
onlyNodeLocalEndpoints = true | |||
} | |||
|
|||
var stickyMaxAgeSeconds int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should set this to 100 (or some good value) here or else the timeout is going to default to zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know - If service.Spec.SessionAffinity == api.ServiceAffinityClientIP
, stickyMaxAgeSeconds
will be set to 10800, and if service.Spec.SessionAffinity != api.ServiceAffinityClientIP
, stickyMaxAgeSeconds
will be 0.
Kube-proxy will ignore the value of stickyMaxAgeSeconds if service.Spec.SessionAffinity != api.ServiceAffinityClientIP. So, does it matter if stickyMaxAgeSeconds
to be 0? Sorry, I don't see any problem, any I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it doesn't really matter. It's a change in behavior from how it was previously though, I'd prefer to see a minimal change from the previous code's behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, sounds fair. It's fixed now. PTAL.
Looks mostly fine. one comment. |
cdf1f99
to
1519c9e
Compare
Kube-proxy will ignore the value of stickyMaxAgeSeconds if service.Spec.SessionAffinity != api.ServiceAffinityClientIP. So, does it matter if |
1519c9e
to
46b4614
Compare
Fixed. PTAL :) |
Kindly ping ~ |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, m1093782566 Associated issue: 53636 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all Tests are more than 96 hours old. Re-running tests. |
Automatic merge from submit-queue (batch tested with PRs 54656, 54552, 54389, 53634, 54408). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
Remove hard code of session affinity timeout in winows kernel proxy - we have already done this in userspace, iptables and ipvs proxy.
Which issue this PR fixes:
fixes #53636
Special notes for your reviewer:
Release note:
/sig network
/area kube-proxy