Skip to content

Commit b6b2428

Browse files
TLSRoute: Set MaxItems=1 for rules[] in v1alpha3 (#3971)
* TLSRoute: Set Rules MaxItems to 1 * TLSRoute: Add omitempty to Rules * TLSRoute: Rules godoc
1 parent eaaf985 commit b6b2428

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

apis/v1alpha3/tlsroute_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ type TLSRouteSpec struct {
9292
// +required
9393
Hostnames []Hostname `json:"hostnames,omitempty"`
9494

95-
// Rules are a list of TLS matchers and actions.
95+
// Rules are a list of actions.
9696
//
9797
// +required
9898
// +kubebuilder:validation:MinItems=1
99-
// +kubebuilder:validation:MaxItems=16
99+
// +kubebuilder:validation:MaxItems=1
100100
// <gateway:experimental:validation:XValidation:message="Rule name must be unique within the route",rule="self.all(l1, !has(l1.name) || self.exists_one(l2, has(l2.name) && l1.name == l2.name))">
101-
Rules []v1alpha2.TLSRouteRule `json:"rules"`
101+
Rules []v1alpha2.TLSRouteRule `json:"rules,omitempty"`
102102
}
103103

104104
// +kubebuilder:object:root=true

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

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

pkg/generated/openapi/zz_generated.openapi.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)