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

Support stickyness #117

Open
jerome-jutteau opened this issue Aug 10, 2022 · 0 comments
Open

Support stickyness #117

jerome-jutteau opened this issue Aug 10, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@jerome-jutteau
Copy link
Contributor

jerome-jutteau commented Aug 10, 2022

What would you like to be added:

I would need to redirect a user accessing a Service to the same backend.
This could be done using Load Balancer Policy.

This may be done by supporting sevice.spec.sessionAffinity: ClientIP (check doc, types) or using a specific annotation for setting Load Balancer Policy.

Why is this needed:

Some application need to use their local session data (like in PHP for instance) in order to retrieve user's data behind a session cookie. So the user need to be redirected to the same backend.

/kind feature

@jerome-jutteau jerome-jutteau added the enhancement New feature or request label Aug 10, 2022
jerome-jutteau added a commit that referenced this issue Aug 22, 2022
sevice.spec.sessionAffinity: ClientIP feature cannot be implemented in current
version of LBU service as session stickiness cannot only rely on client's IP.
However, session stickiness is still only possible through web cookies using
LBCookieStickinessPolicy or AppCookieStickinessPolicy.

This commit allow CCM users to configure a LBCookieStickinessPolicy using annotations:

1. service.beta.kubernetes.io/osc-load-balancer-affinity

When this annotation is set to "lb-cookie", a pre-defined LBCookieStickinessPolicy will be attached
to the load-balancer.

2. service.beta.kubernetes.io/osc-load-balancer-lb-cookie-expiration-period

When osc-load-balancer-affinity annotation is set to "lb-cookie", this annotation will
configure cookie expiration period of LBCookieStickinessPolicy.
When not set or set to 1, the cookie will not expire.
When set to a value above 1, the provided value is the expiration period in seconds.

XXX DEV / WIP NOTES XXX

Pour activer les stickiness policies, il fait aussi appeler https://docs.outscale.com/lbu#setloadbalancerpoliciesoflistener

SAUF que ça doit s'appliquer sur un port dont le protocol est "http" ou "http" et non "tcp" comme le lb créé. A noter que le user k8s ne peut spécifier que tcp, udp ou sctp.
solution 1: ajouter une annotation pour lister les ports qui sont en http et non en tcp
Ca en fait une solution bloaté et ajoute une compléxité pour une feature qui n'est pas encore demandée par un client.

closes #117

Signed-off-by: Jérôme Jutteau <jerome.jutteau@outscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant