Skip to content

Commit e60faa0

Browse files
authored
Merge pull request #2059 from k8s-infra-cherrypick-robot/cherry-pick-2054-to-release-0.7
[release-0.7] Add method matching to HTTPRoute matching precedence order
2 parents 692afa8 + cc22914 commit e60faa0

File tree

4 files changed

+67
-66
lines changed

4 files changed

+67
-66
lines changed

apis/v1beta1/httproute_types.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,13 @@ type HTTPRouteRule struct {
158158
// Proxy or Load Balancer routing configuration generated from HTTPRoutes
159159
// MUST prioritize matches based on the following criteria, continuing on
160160
// ties. Across all rules specified on applicable Routes, precedence must be
161-
// given to the match with the largest number of:
161+
// given to the match having:
162162
//
163-
// * Characters in a matching "Exact" path match
164-
// * Characters in a matching "Prefix" path match
165-
// * Header matches.
166-
// * Query param matches.
163+
// * "Exact" path match.
164+
// * "Prefix" path match with largest number of characters.
165+
// * Method match.
166+
// * Largest number of header matches.
167+
// * Largest number of query param matches.
167168
//
168169
// Note: The precedence of RegularExpression path matches are implementation-specific.
169170
//

config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/standard/gateway.networking.k8s.io_httproutes.yaml

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conformance/tests/httproute-method-matching.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ var HTTPRouteMethodMatching = suite.ConformanceTest{
118118
},
119119
{
120120
Request: http.Request{Headers: map[string]string{"version": "four"}, Path: "/", Method: "PATCH"},
121-
Backend: "infra-backend-v3",
121+
Backend: "infra-backend-v2",
122122
Namespace: ns,
123123
},
124124
}...)

0 commit comments

Comments
 (0)