-
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
Question: lua-resty-balancer and upstream-hash-by #2552
Comments
Hi @JordanP, yes, it should work. You don't need that commit unless you're using session affinity annotation. By the way, we at Shopify run ingress-nginx in dynamic mode for most of our services. |
Great that it should ! I am not using session affinity but running with 0.15 doesn't work. All my requests are always sent to the same upstream server. You sure this function https://github.com/kubernetes/ingress-nginx/blob/nginx-0.15.0/rootfs/etc/nginx/lua/util.lua#L7 would work if Good to know that Shopify is running in dynamic mode, it gives confidence. |
I've not tried regex group capturing myself but according to https://github.com/openresty/lua-nginx-module#ngxvarvariable
therefore I said it should work. If you can post here the exact configuration you use I can try to regenerate locally.
I'd assume so. It'd be easier to talk on a specific config you have though. |
So I manage to come up with a nice and easy reproducer :) Take this file here: https://github.com/kubernetes/ingress-nginx/blob/master/images/echoheaders/echo-app.yaml (bump the replicas to 2 or 3) and add the following ingress:
Now without If you do the same with I know you may not have a lot of time to debug/support this, but if this could work for me I'd be a thorough tester and user of |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
@ElvinEfendi I've tested the fix, it works ! Thanks you 👍 |
Hi guys,
So call me a fool but I'd like to give the
enable-dynamic-configuration=true
a shot in production here.But some of my Ingresses run with
ingress.kubernetes.io/upstream-hash-by: "$1"
where the$1
is a capturing group of rewrite regex (injected withingress.kubernetes.io/configuration-snippet
)Question is: would that work with
lua-resty-balancer
? I could give it a try but release 0.15 does not have commit 7ac4e1d and I think I need that commit.@ElvinEfendi what do you think ?
Thanks
The text was updated successfully, but these errors were encountered: