Skip to content

Commit

Permalink
Add method matching to HTTPRoute matching precedence order
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravkghildiyal authored and k8s-infra-cherrypick-robot committed May 24, 2023
1 parent 692afa8 commit cc22914
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 66 deletions.
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
// * 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

0 comments on commit cc22914

Please sign in to comment.