-
Notifications
You must be signed in to change notification settings - Fork 690
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gateway API: implement HTTP query param matching (#4588)
Closes #4089. Signed-off-by: Steve Kriss <[email protected]>
- Loading branch information
Showing
13 changed files
with
580 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## Gateway API: implement HTTP query parameter matching | ||
|
||
Contour now implements Gateway API's [HTTP query parameter matching](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.HTTPQueryParamMatch). | ||
Only `Exact` matching is supported. | ||
For example, the following HTTPRoute will send a request with a query string of `?animal=whale` to `s1`, and a request with a querystring of `?animal=dolphin` to `s2`. | ||
|
||
```yaml | ||
apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
kind: HTTPRoute | ||
metadata: | ||
name: httproute-queryparam-matching | ||
spec: | ||
parentRefs: | ||
- name: contour-gateway | ||
rules: | ||
- matches: | ||
- queryParams: | ||
- type: Exact | ||
name: animal | ||
value: whale | ||
backendRefs: | ||
- name: s1 | ||
- matches: | ||
- queryParams: | ||
- type: Exact | ||
name: animal | ||
value: dolphin | ||
backendRefs: | ||
- name: s2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.