Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Standardise or document Ingress path expressions across implementations #885
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.
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?)
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
@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:
This is unfortunate that the same ingress definition can not be used on both controllers.
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.