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 sessionAffinity ClientIP from services #7748
Remove sessionAffinity ClientIP from services #7748
Conversation
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.
LGTM.
Agreed that there is no need for having a variable to customize this property since the session affinity should be determined by the server side instead of the client side. There is no session concept in our API server.
note: The default value of sessionAffinity
is None
.
Good catch on |
Longhorn 7399 Signed-off-by: Eric Weber <eric.weber@suse.com>
a136172
to
7dc1255
Compare
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.
LGTM
Agree that we should remove the setting completely!
Quick question. Assume that we have sessionAffinity: ClientIP
set. In the first time the client connects to the backend service it is routed to manager pod with IP-1. Then manager pod with IP-1 crash, restarted, and get a new IP-2. When client connect to backend service for the 2nd time, will Kubernetes network control plane route the client to a new IP different than the IP-1 assume no manager pod has IP-1 anymore?
I think yes, though I am interested enough to test it. From #7399 (comment): The chain that handles load balancing (
The event you described should cause kube-proxy to remove the list of source IPs that previously balanced to the old destination IP and the rule that would check that list (e.g. In other words, I don't think |
@mergify backport v1.6.x v1.5.x v1.4.x |
✅ Backports have been created
|
Which issue(s) this PR fixes:
Issue #7399
What this PR does / why we need it:
Remove
sessionAffinity: ClientIP
from Longhorn services. See #7399 for justification.Special notes for your reviewer:
We could optionally introduce a Helm variable that controls the value of
sessionAffinity
for the Longhorn services that previously usedsessionAffinity: ClientIP
. If we did this, I would argue for makingNone
the default, with the option to change back toClientIP
if desired. However:sessionAffinity: ClientIP
,I'm curious whether reviewers agree.