-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Standardise or document Ingress path expressions across implementations #885
Comments
If you can point out the exact difference and expected behavior, we might be able to get the nginx controller to do what we want. It's obviously a lot harder to change the cloud lb formatting rules. |
Are AWS and GCE the same? If so - I'd suggest that is the behaviour we want. |
What is "this"? we need to handle this on a case by case basis, we don't have bw to figure out every part of the spec each of these implement differently :) |
I have no experience with AWS - so I can not help here I appreciate the bandwidth issue, and don't have any expectations of a quick fix :-) For now, I would suggest aligning nginx with "whatever GKE does" If I get more time I will look at the differences between the two. For now, I just added foo/ and foo/*, and that seems to work on both |
Hmm, IIUC in this case nginx is actually more lenient and accepts both foo/ and foo/* to do the same thing (i.e proxy to /foo/bar or whatever, haven't tried it yet)? If so, we should try to get "foo/" to match exactly "foo/" |
@bprashanth the current behavior in the nginx controller is to not use exact match. Please check this example from the nginx docs (configuration B is how it works now). |
To further clarify: This is a "prefix" match. That is, it will match /foo, /foo/bar, /foo/bar/xx, .. On GCE, I believe two path rules need to be setup to handle this case: I can't recollect if the GCE ingress controller does this or not (may get time to test later this week). If not- setting up those two rules would seem to make the implementations align. I believe I previously had a trailing / on my path: Which caused some of my prior confusion. |
Update: GCE ingress controller does not add a wildcard to a path expression. To get the same behaviour as Nginx, you need two path expressions in the ingress definition: Which is equivalent to: on Nginx. This is unfortunate that the same ingress definition can not be used on both controllers. |
yeah so /foo is exactly foo and if you want anything more, you need foo/*. I think this conflicts with the nginx defaults as pointed out in #885 (comment) |
I've been wondering the opposite: how to have an exact match for a path with the nginx controller. Any idea? |
My use case is that I have a web application pod with 3 containers:
The problem is that for 2 I need to match exactly the path I would love to have GCE-style ingress path rules in the contrib nginx controller. |
This issue was moved to kubernetes/ingress-nginx#555 |
Path expressions in the Ingress are provider specific - so a path expression (say /foo/) that works in one provider does not work the same in another.
For example:
path: /foo/
Seems to result in different behaviour on GKE vs. the nginx controller.
If it is not realistic to standardise paths, the providers should document the interpretation of the path expression ( example: does /foo/ match /foo/bar?)
The text was updated successfully, but these errors were encountered: