Skip to content
Open
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
4 changes: 4 additions & 0 deletions apis/networking/v1beta1/gatewayserver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type GatewayServerSpec struct {
}

// EndpointStatus defines the observed state of the endpoint.
// +kubebuilder:validation:XValidation:rule="!(has(self.port)&&has(self.ports)&&self.port!=self.ports[0])",message="port must match ports[0]"
type EndpointStatus struct {
// Addresses specifies the addresses of the endpoint.
Addresses []string `json:"addresses,omitempty"`
Expand All @@ -74,6 +75,9 @@ type EndpointStatus struct {
// Protocol specifies the protocol of the endpoint.
// +kubebuilder:validation:Enum=TCP;UDP
Protocol *corev1.Protocol `json:"protocol,omitempty"`
// Ports specifies the ports of the endpoint.
// This field is preferred over the legacy Port field, which is kept for backward compatibility.
Ports []int32 `json:"ports,omitempty"`
}

// InternalGatewayEndpoint defines the endpoint for the internal network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,24 @@ spec:
description: Port specifies the port of the endpoint.
format: int32
type: integer
ports:
description: |-
Ports specifies the ports of the endpoint.
This field is preferred over the legacy Port field, which is kept for backward compatibility.
items:
format: int32
type: integer
type: array
protocol:
description: Protocol specifies the protocol of the endpoint.
enum:
- TCP
- UDP
type: string
type: object
x-kubernetes-validations:
- message: port must match ports[0]
rule: '!(has(self.port)&&has(self.ports)&&self.port!=self.ports[0])'
mtu:
description: MTU specifies the MTU of the tunnel.
type: integer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,24 @@ spec:
description: Port specifies the port of the endpoint.
format: int32
type: integer
ports:
description: |-
Ports specifies the ports of the endpoint.
This field is preferred over the legacy Port field, which is kept for backward compatibility.
items:
format: int32
type: integer
type: array
protocol:
description: Protocol specifies the protocol of the endpoint.
enum:
- TCP
- UDP
type: string
type: object
x-kubernetes-validations:
- message: port must match ports[0]
rule: '!(has(self.port)&&has(self.ports)&&self.port!=self.ports[0])'
internalEndpoint:
description: InternalEndpoint specifies the endpoint for the internal
network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10447,13 +10447,24 @@ spec:
description: Port specifies the port of the endpoint.
format: int32
type: integer
ports:
description: |-
Ports specifies the ports of the endpoint.
This field is preferred over the legacy Port field, which is kept for backward compatibility.
items:
format: int32
type: integer
type: array
protocol:
description: Protocol specifies the protocol of the endpoint.
enum:
- TCP
- UDP
type: string
type: object
x-kubernetes-validations:
- message: port must match ports[0]
rule: '!(has(self.port)&&has(self.ports)&&self.port!=self.ports[0])'
internalEndpoint:
description: InternalEndpoint specifies the endpoint for the internal
network.
Expand Down
Loading