-
Notifications
You must be signed in to change notification settings - Fork 78
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
Update KIngress rule path to be a literal string #364
Update KIngress rule path to be a literal string #364
Conversation
The documentation comment called for the path of a rule to be an extended POSIX regular expression, but this behavior has not been implemented correctly by any of the networking layers. The Serving component also treats it as a literal when it sets up the path. This change clarifies the comment to make it clear that this is, in fact, a literal string prefix, and not a regular expression.
@impl: GitHub didn't allow me to request PR reviews from the following users: kflynn. Note that only knative members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Welcome @impl! It looks like this is your first PR to knative/networking 🎉 |
Hi @impl. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
@@ Coverage Diff @@
## main #364 +/- ##
=======================================
Coverage 95.30% 95.30%
=======================================
Files 37 37
Lines 766 766
=======================================
Hits 730 730
Misses 25 25
Partials 11 11
Continue to review full report at Codecov.
|
/ok-to-test |
/lgtm I guess that the comment was aligned with k8s's Ingress v1 but the k8s's ingress also drops the comment lines and just support /assign @tcnghia @ZhiminXiang |
/lgtm |
1 similar comment
/lgtm |
Thanks! That explanation makes a lot of sense. I'll follow up with a fix PR to net-istio and a small docs update to net-contour. net-kourier seems fine as-is. /assign @grantr |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tcnghia The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
🧹 The documentation comment in
ingress_types.go
called for the path of a rule to be an extended POSIX regular expression, but this behavior has not been implemented correctly by any of the networking layers. The Serving component also treats it as a literal when it sets up the path.This change clarifies the comment to make it clear that this is, in fact, a literal string prefix, and not a regular expression.
You can see the implementation in the Serving component here:
The implementation in net-istio tries to use a regular expression, but because Envoy uses exact matching for regular expressions instead of prefix matching, it actually seemingly deviates from the behavior of other networking layers.
On the other hand, net-contour just uses a regular ol' prefix match.
If this change makes sense to you all, I would be happy to open an additional PR against net-istio to make it use a prefix match as well.
See also our discussion over in the Ambassador repository here: emissary-ingress/emissary#3224
/kind cleanup
/cc @kflynn