File tree Expand file tree Collapse file tree 7 files changed +23
-9
lines changed Expand file tree Collapse file tree 7 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,9 @@ type Listener struct {
390390 // same port, subject to the Listener compatibility rules.
391391 //
392392 // Support: Core
393+ //
394+ // +kubebuilder:validation:Minimum=1
395+ // +kubebuilder:validation:Maximum=65535
393396 Port PortNumber `json:"port"`
394397
395398 // Protocol specifies the network protocol this listener expects to receive.
Original file line number Diff line number Diff line change @@ -1209,6 +1209,9 @@ type HTTPRequestRedirectFilter struct {
12091209 // Support: Extended
12101210 //
12111211 // +optional
1212+ //
1213+ // +kubebuilder:validation:Minimum=1
1214+ // +kubebuilder:validation:Maximum=65535
12121215 Port * PortNumber `json:"port,omitempty"`
12131216
12141217 // StatusCode is the HTTP status code to be used in response.
Original file line number Diff line number Diff line change @@ -143,6 +143,8 @@ type BackendObjectReference struct {
143143 // resource or this field.
144144 //
145145 // +optional
146+ // +kubebuilder:validation:Minimum=1
147+ // +kubebuilder:validation:Maximum=65535
146148 Port * PortNumber `json:"port,omitempty"`
147149}
148150
Original file line number Diff line number Diff line change @@ -148,6 +148,9 @@ type ParentReference struct {
148148 // Support: Extended
149149 //
150150 // +optional
151+ //
152+ // +kubebuilder:validation:Minimum=1
153+ // +kubebuilder:validation:Maximum=65535
151154 Port * PortNumber `json:"port,omitempty"`
152155}
153156
@@ -227,9 +230,6 @@ type CommonRouteSpec struct {
227230}
228231
229232// PortNumber defines a network port.
230- //
231- // +kubebuilder:validation:Minimum=1
232- // +kubebuilder:validation:Maximum=65535
233233type PortNumber int32
234234
235235// BackendRef defines how a Route should forward a request to a Kubernetes
Original file line number Diff line number Diff line change @@ -40,9 +40,6 @@ type ParentReference = v1.ParentReference
4040type CommonRouteSpec = v1.CommonRouteSpec
4141
4242// PortNumber defines a network port.
43- //
44- // +kubebuilder:validation:Minimum=1
45- // +kubebuilder:validation:Maximum=65535
4643type PortNumber = v1.PortNumber
4744
4845// BackendRef defines how a Route should forward a request to a Kubernetes
Original file line number Diff line number Diff line change @@ -40,9 +40,6 @@ type ParentReference = v1.ParentReference
4040type CommonRouteSpec = v1.CommonRouteSpec
4141
4242// PortNumber defines a network port.
43- //
44- // +kubebuilder:validation:Minimum=1
45- // +kubebuilder:validation:Maximum=65535
4643type PortNumber = v1.PortNumber
4744
4845// BackendRef defines how a Route should forward a request to a Kubernetes
Original file line number Diff line number Diff line change @@ -128,7 +128,16 @@ type ListenerEntry struct {
128128 // Port is the network port. Multiple listeners may use the
129129 // same port, subject to the Listener compatibility rules.
130130 //
131+ // If the port is not set or specified as zero, the implementation will assign
132+ // a unique port. If the implementation does not support dynamic port
133+ // assignment, it MUST set `Accepted` condition to `False` with the
134+ // `UnsupportedPort` reason.
135+ //
131136 // +optional
137+ //
138+ // +kubebuilder:default=0
139+ // +kubebuilder:validation:Minimum=0
140+ // +kubebuilder:validation:Maximum=65535
132141 Port PortNumber `json:"port,omitempty"`
133142
134143 // Protocol specifies the network protocol this listener expects to receive.
@@ -210,6 +219,9 @@ type ListenerEntryStatus struct {
210219 Name SectionName `json:"name"`
211220
212221 // Port is the network port the listener is configured to listen on.
222+ //
223+ // +kubebuilder:validation:Minimum=1
224+ // +kubebuilder:validation:Maximum=65535
213225 Port PortNumber `json:"port"`
214226
215227 // SupportedKinds is the list indicating the Kinds supported by this
You can’t perform that action at this time.
0 commit comments