Skip to content

Commit

Permalink
chore: make L4 match rules a list
Browse files Browse the repository at this point in the history
This is in order to align it better with
how match rules are currently expressed
using the HTTPRoute API.
  • Loading branch information
shaneutt committed Jan 4, 2022
1 parent 19f1646 commit 694e320
Show file tree
Hide file tree
Showing 9 changed files with 346 additions and 316 deletions.
3 changes: 2 additions & 1 deletion apis/v1alpha2/tcproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ type TCPRouteRule struct {
// Matches are rules for routing traffic to backends based on addresses.
//
// +optional
Matches *AddressRouteMatches `json:"matches,omitempty"`
// +kubebuilder:validation:MaxItems=16
Matches []AddressRouteMatches `json:"matches,omitempty"`

// BackendRefs defines the backend(s) where matching requests should be
// sent. If unspecified or invalid (refers to a non-existent resource or a
Expand Down
3 changes: 2 additions & 1 deletion apis/v1alpha2/udproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ type UDPRouteRule struct {
// Matches add rules for filtering traffic to backends based on addresses.
//
// +optional
Matches *AddressRouteMatches `json:"matches,omitempty"`
// +kubebuilder:validation:MaxItems=16
Matches []AddressRouteMatches `json:"matches,omitempty"`

// BackendRefs defines the backend(s) where matching requests should be
// sent. If unspecified or invalid (refers to a non-existent resource or a
Expand Down
12 changes: 8 additions & 4 deletions apis/v1alpha2/zz_generated.deepcopy.go

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

160 changes: 83 additions & 77 deletions config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml

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

Loading

0 comments on commit 694e320

Please sign in to comment.