Skip to content
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

Add method matching to HTTPRoute matching precedence order #2054

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions apis/v1beta1/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ type HTTPRouteRule struct {
// Proxy or Load Balancer routing configuration generated from HTTPRoutes
// MUST prioritize matches based on the following criteria, continuing on
// ties. Across all rules specified on applicable Routes, precedence must be
// given to the match with the largest number of:
// given to the match having:
//
// * Characters in a matching "Exact" path match
robscott marked this conversation as resolved.
Show resolved Hide resolved
// * Characters in a matching "Prefix" path match
// * Header matches.
// * Query param matches.
// * "Exact" path match.
// * "Prefix" path match with largest number of characters.
// * Method match.
// * Largest number of header matches.
// * Largest number of query param matches.
//
// Note: The precedence of RegularExpression path matches are implementation-specific.
//
Expand Down
60 changes: 30 additions & 30 deletions config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 30 additions & 30 deletions config/crd/standard/gateway.networking.k8s.io_httproutes.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion conformance/tests/httproute-method-matching.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var HTTPRouteMethodMatching = suite.ConformanceTest{
},
{
Request: http.Request{Headers: map[string]string{"version": "four"}, Path: "/", Method: "PATCH"},
Backend: "infra-backend-v3",
Backend: "infra-backend-v2",
Namespace: ns,
},
}...)
Expand Down