-
Notifications
You must be signed in to change notification settings - Fork 204
Ingress pathType "Prefix" can override pathType "Exact" #703
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
Comments
Just a while ago I wondered the Implementation Specific variant could by also implemented in haproxy with regex matching available. |
Hi @dosmanak, if an ingress controller wants to implement regex-based parsing then pathType |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bump to remove stale label. There is still an open PR for this and it is still discussed by the maintainers AFAIK. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@oktalz Do you have a suggestion on how to improve the naming of the new map file? |
Let's assume we have a web service with prefix
/foo
. There are many sub-paths for/foo/...
. Let's also assume we want to have different timeouts for/foo
and/foo/.*
.We would expect the following to work:
The annotation
haproxy.org/standalone-backend
ensures two separate backends are created so that the different timeouts do not fight each other.Now we have the problem that
/etc/haproxy/maps/path-exact.map
has the following contents:That means the actual exact match from ingress
just-foo
will never match since pathTypePrefix
patterns are also put into this pattern file.Here we can find the responsible code:
I do understand why
Prefix
paths must have an entry inpath-exact.map
: The definition of ingress resources mandates that/foo
must match/foo
and/foo/bar
but never/foobar
. Therefore we add/foo
to exact matches and/foo/
to prefix matches (viamap_beg
).The only way I see to resolve this issue in a clean and backward-compatible way is to introduce a new map file which will contain all exact matches from pathType
Prefix
only and it will be matched if there was no match inpath-exact.map
which will then contain ONLY pathTypeExact
patterns.I will follow up with a PR.
The text was updated successfully, but these errors were encountered: