Skip to content

Commit

Permalink
Remove unrequired validation for port protocol (#14)
Browse files Browse the repository at this point in the history
Signed-off-by: Waleed Malik <[email protected]>
  • Loading branch information
ahmedwaleedmalik authored May 8, 2024
1 parent 5baceed commit 12e0324
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
13 changes: 4 additions & 9 deletions api/kubelb.k8c.io/v1alpha1/loadbalancer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ type LoadBalancerPort struct {
// +optional
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`

// The IP protocol for this port. Supports "TCP".
// Default is TCP.
// +optional
// +kubebuilder:validation:Enum=TCP
// The IP protocol for this port. Defaults to "TCP".
// +kubebuilder:validation:Enum=TCP;UDP
Protocol corev1.Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"`

// The port that will be exposed by the LoadBalancer.
Expand All @@ -82,11 +80,8 @@ type EndpointPort struct {
// The port number of the endpoint.
Port int32 `json:"port" protobuf:"varint,2,opt,name=port"`

// The IP protocol for this port.
// Must be TCP.
// Default is TCP.
// +optional
// +kubebuilder:validation:Enum=TCP
// The IP protocol for this port. Defaults to "TCP".
// +kubebuilder:validation:Enum=TCP;UDP
Protocol corev1.Protocol `json:"protocol,omitempty" protobuf:"bytes,3,opt,name=protocol,casttype=Protocol"`
}

Expand Down
12 changes: 5 additions & 7 deletions charts/kubelb-manager/crds/kubelb.k8c.io_loadbalancers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ spec:
type: integer
protocol:
default: TCP
description: |-
The IP protocol for this port.
Must be TCP.
Default is TCP.
description: The IP protocol for this port. Defaults to
"TCP".
enum:
- TCP
- UDP
type: string
required:
- port
Expand Down Expand Up @@ -133,11 +132,10 @@ spec:
type: integer
protocol:
default: TCP
description: |-
The IP protocol for this port. Supports "TCP".
Default is TCP.
description: The IP protocol for this port. Defaults to "TCP".
enum:
- TCP
- UDP
type: string
required:
- port
Expand Down
12 changes: 5 additions & 7 deletions config/crd/bases/kubelb.k8c.io_loadbalancers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ spec:
type: integer
protocol:
default: TCP
description: |-
The IP protocol for this port.
Must be TCP.
Default is TCP.
description: The IP protocol for this port. Defaults to
"TCP".
enum:
- TCP
- UDP
type: string
required:
- port
Expand Down Expand Up @@ -133,11 +132,10 @@ spec:
type: integer
protocol:
default: TCP
description: |-
The IP protocol for this port. Supports "TCP".
Default is TCP.
description: The IP protocol for this port. Defaults to "TCP".
enum:
- TCP
- UDP
type: string
required:
- port
Expand Down

0 comments on commit 12e0324

Please sign in to comment.