Skip to content
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

Merged
merged 1 commit into from
Oct 27, 2017

Conversation

m1093782566
Copy link
Contributor

@m1093782566 m1093782566 commented Oct 10, 2017

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:

NONE

/sig network
/area kube-proxy

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. area/kube-proxy size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 10, 2017
@m1093782566
Copy link
Contributor Author

cc @madhanrm

@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. area/kube-proxy labels Oct 10, 2017
@k8s-ci-robot k8s-ci-robot assigned thockin and unassigned lavalamp Oct 13, 2017
@@ -165,6 +165,10 @@ func newServiceInfo(svcPortName proxy.ServicePortName, port *api.ServicePort, se
onlyNodeLocalEndpoints = true
}

var stickyMaxAgeSeconds int
Copy link
Contributor

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.

Copy link
Contributor Author

@m1093782566 m1093782566 Oct 21, 2017

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@brendandburns
Copy link
Contributor

Looks mostly fine. one comment.

@m1093782566
Copy link
Contributor Author

m1093782566 commented Oct 21, 2017

@brendanburns

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?

@m1093782566
Copy link
Contributor Author

Fixed. PTAL :)

@m1093782566
Copy link
Contributor Author

Kindly ping ~

@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 26, 2017
@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

/test all

Tests are more than 96 hours old. Re-running tests.

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 26, 2017
@k8s-github-robot
Copy link

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.

@k8s-github-robot k8s-github-robot merged commit 6fbd2a1 into kubernetes:master Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kube-proxy cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should remove hard code of session affinity timeout in winows kernel proxy
6 participants