Skip to content

Commit 4835e67

Browse files
committed
set proper min/max value for listenerentry.port
We had to drop the use of the PortNumber type because of limitations with overriding min max using kubebuilder annotations
1 parent c1eac08 commit 4835e67

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

apisx/v1alpha1/xlistenerset_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ type ListenerEntry struct {
129129
// same port, subject to the Listener compatibility rules.
130130
//
131131
// +optional
132-
Port PortNumber `json:"port,omitempty"`
132+
//
133+
// +kubebuilder:validation:Minimum=0
134+
// +kubebuilder:validation:Maximum=65535
135+
Port int32 `json:"port,omitempty"`
133136

134137
// Protocol specifies the network protocol this listener expects to receive.
135138
Protocol ProtocolType `json:"protocol"`

applyconfiguration/apisx/v1alpha1/listenerentry.go

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

config/crd/experimental/gateway.networking.x-k8s.io_xlistenersets.yaml

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

geps/gep-1713/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ type ListenerEntry struct {
172172
// Support: Core
173173
//
174174
// +optional
175-
Port *PortNumber `json:"port,omitempty"`
175+
//
176+
// +kubebuilder:validation:Minimum=0
177+
// +kubebuilder:validation:Maximum=65535
178+
Port int32 `json:"port,omitempty"`
176179

177180
// Protocol specifies the network protocol this listener expects to receive.
178181
//

0 commit comments

Comments
 (0)