-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Only set cookies on paths that enable session affinity #3383
Conversation
9d1ecdc
to
4ba2518
Compare
LGTM 👍 |
@diazjf: Bad category. Please see https://api.thecatapi.com/api/categories/list In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@diazjf: Bad category. Please see https://api.thecatapi.com/api/categories/list In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
2e2ff01
to
1239ab9
Compare
3ceb2c2
to
b5ddb00
Compare
ffd651b
to
86e0f69
Compare
86e0f69
to
2b109b3
Compare
@zrdaley can you rebase with latest master so that this gets tested with your other merged session affinity change? |
I already did @ElvinEfendi |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ElvinEfendi, zrdaley The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@zrdaley what is expected behaviour if |
@unicast The current implementation expects a host, if it's not specified it won't set a cookie: |
Hi @zrdaley ,
Why is suddenly host a required parameter on the ingress definition. It's been always an optional parameter and by making it required it breaks backwards compatibility. 😕 |
If the host is specified and it's a wildcard, no session cookie will be set either. This breaks our current setup. We have:
Having to specify each hostname leads to a multiplication of a large number of paths on both ingress definitions. The second ingress (serving static content) can no longer use wildcards - nginx will prefer the more specific hostnames and will no longer route traffic to the webserver. |
What this PR does / why we need it:
Session affinity is set on the a backend, not on the location path. This causes problems when multiple ingress definitions are created for the same host and not all enable session affinity.
Following this PR, session affinity cookies will only be set on paths with ingresses that have session affinity enabled.
Which issue this PR fixes: #3168