-
Notifications
You must be signed in to change notification settings - Fork 632
Clarify HTTPRouteMatch rules #3741
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
Clarify HTTPRouteMatch rules #3741
Conversation
Signed-off-by: Vegard Hagen <[email protected]>
|
Welcome @vehagn! |
|
Hi @vehagn. Thanks for your PR. I'm waiting for a kubernetes-sigs 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-sigs/prow repository. |
site-src/api-types/httproute.md
Outdated
| The following example forwards HTTP requests for prefix `/bar` to service | ||
| "my-service1" on port `8080` and HTTP requests for prefix `/some/thing` with | ||
| header `magic: foo` to service "my-service2" on port `8080`: | ||
| header `magic: foo` **AND** query param `great: example` to service "my-service2" on port `8080`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| header `magic: foo` **AND** query param `great: example` to service "my-service2" on port `8080`: | |
| method `GET`, header `magic: foo` **AND** query param `great: example` to | |
| service "my-service2" on port `8080`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I completely missed that last one. I'd prefer to explicitly list all four criteria instead of a somewhat convoluted sentence.
mikemorris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks @vehagn! We should mention the HTTP method too, as these are all ANDed together.
/ok-to-test
also try to use more clear language Signed-off-by: Vegard Hagen <[email protected]>
|
/lgtm |
|
/assign danwinship |
|
lol why am I an approver? 😬 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, mikemorris, vehagn 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 |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
Documentation clarification of the
HTTPRouteMatchrules.The documentation links to the following example
HTTPRoutegateway-api/examples/standard/basic-http.yaml
Lines 25 to 57 in 3222422
with a
rules.matchesentry with three elements:headers,queryParamsandpath.From the current wording it is unclear if you need to match the
queryParamscriterion or not.My understand from reading the Matches section and HTTPRouteMatch documentation is that you need to match all criteria (
headers,queryParams, andpath) in order to be forwarded to the "my-service2" backend on port 8080.Alternatively the
basic-http.yamlexample can be modified to remove toqueryParamsrule.If my understanding is wrong I'd be happy to update the documentation with the correct logic.
Does this PR introduce a user-facing change?: