opta icon indicating copy to clipboard operation
opta copied to clipboard

Allow Enabling Ingress Nginx Service-Upstream Annotation

Open jocchionero opened this issue 2 years ago • 0 comments

What would you like to be added:

We would like to have the option to set the nginx.ingress.kubernetes.io/service-upstream annotation on ingress resources to "true". This would allow us to leverage linkerd's serviceprofiles to load balance and add some extra linkerd routing capabilities.

https://linkerd.io/2.11/tasks/using-ingress/#nginx

Why is this needed:

The annotation nginx.ingress.kubernetes.io/service-upstream: "true" is used to tell Nginx Ingress Controller to route traffic to the service of the meshed application instead of directly to the pods. By default, Ingress Controllers query the endpoints of their target service to retrieve the IP addresses of the pods behind the service. They route traffic to the pods directly. By sending traffic to the service, Linkerd features such as load balancing and traffic splitting are enabled. Only caveat being when you use the annotation above, you cannot have sticky sessions with cookie-based affinity--we fortunately are not concerned about sticky sessions, so enabling true for everyone could be opinionated.

Extra info (e.g. existing slack convo link):

Opta: https://opta-group.slack.com/archives/C0240NBKUMT/p1656010415309269

Linkerd: https://linkerd.slack.com/archives/C89RTCWJF/p1648220320987219?thread_ts=1648218339.750139&cid=C89RTCWJF

jocchionero avatar Jun 27 '22 22:06 jocchionero