-
Notifications
You must be signed in to change notification settings - Fork 5.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
Allow setting load balancer method and sticky using service annotations #1068
Allow setting load balancer method and sticky using service annotations #1068
Conversation
@emilevauge @bakins Kubernetes load balancer settings are officially set using service annotations. I think that using the same process for traefik would be beneficial :) 👍 |
6ef3b4c
to
3bd9792
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!
Thanks @bakins
/cc @containous/traefik
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 🦁
c3484e9
to
490427f
Compare
Rebased on master |
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
Will i be able to see any indication on the dashboard that a service is sticky? I have added the annotation, but nothing changes in the UI. Is it documented ? |
@hoeghh Currently the dashboard doesn't display the sticky state. You can call |
@ldez thanks, it works. @dtomcej But not until i found out that the annotation should be on the service object, and not the ingress object. That just does not make any sense. Why would the annotation be on the service object? I get that not all Kubernetes variants have ingress (OpenShift) but still. The ingress object is there to tell the ingress controller how to act. The service is mostly used inside the cluster for endpoint lookups. |
@hoeghh The reason the annotation is on the service is due to the |
@hoeghh An ingress can reference several services and a service can be in more than one ingress. One may need to set sticky, circuit breaker, or other options on a per service basis. |
My take on #940 - slightly modified.
As we are setting backend behavior, I think the annotations should be on the backend - the Kubernetes service.
Includes unit tests for sticky and drr. having issues getting integration tests running locally, but I'll figure that out and patch as needed.