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

fix(MeshHTTPRoute): require at least one match #6796

Merged
merged 2 commits into from
May 23, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,8 @@ spec:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests
this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -1547,6 +1549,7 @@ spec:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,8 @@ spec:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests
this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -1547,6 +1549,7 @@ spec:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,8 @@ spec:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests
this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -1750,6 +1752,7 @@ spec:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,8 @@ spec:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests
this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -1567,6 +1569,7 @@ spec:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2730,6 +2730,8 @@ spec:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests
this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -2818,6 +2820,7 @@ spec:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2933,6 +2933,8 @@ spec:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests
this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -3021,6 +3023,7 @@ spec:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down
3 changes: 3 additions & 0 deletions deployments/charts/kuma/crds/kuma.io_meshhttproutes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ spec:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests
this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -453,6 +455,7 @@ spec:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ type To struct {
}

type Rule struct {
// Matches describes how to match HTTP requests this rule should be applied
// to.
// +kubebuilder:validation:MinItems=1
Matches []Match `json:"matches" policyMerge:"mergeKey"`
// Default holds routing rules that can be merged with rules from other
// policies.
Expand Down
2 changes: 2 additions & 0 deletions pkg/plugins/policies/meshhttproute/api/v1alpha1/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ properties:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -372,6 +373,7 @@ properties:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ spec:
type: array
type: object
matches:
description: Matches describes how to match HTTP requests
this rule should be applied to.
items:
properties:
headers:
Expand Down Expand Up @@ -453,6 +455,7 @@ spec:
type: object
type: array
type: object
minItems: 1
type: array
required:
- default
Expand Down