Skip to content

Commit fd5e11f

Browse files
authored
fix: adds enum validations to healtcheckprotocol field (#4193)
* fix: adds enum validations to healtcheckprotocol field * fix: revert enum changes in v1beta1
1 parent abfa936 commit fd5e11f

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

api/v1beta2/awscluster_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ type AWSLoadBalancerSpec struct {
195195

196196
// HealthCheckProtocol sets the protocol type for ELB health check target
197197
// default value is ELBProtocolSSL
198+
// +kubebuilder:validation:Enum=TCP;SSL;HTTP;HTTPS;TLS;UDP
198199
// +optional
199200
HealthCheckProtocol *ELBProtocol `json:"healthCheckProtocol,omitempty"`
200201

api/v1beta2/network_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ var (
7373
ELBProtocolHTTPS = ELBProtocol("HTTPS")
7474
// ELBProtocolTLS defines the NLB API string representing the TLS protocol.
7575
ELBProtocolTLS = ELBProtocol("TLS")
76-
// ELBProtocolUDP defines the NLB API string representing the UPD protocol.
76+
// ELBProtocolUDP defines the NLB API string representing the UDP protocol.
7777
ELBProtocolUDP = ELBProtocol("UDP")
7878
)
7979

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,13 @@ spec:
992992
healthCheckProtocol:
993993
description: HealthCheckProtocol sets the protocol type for ELB
994994
health check target default value is ELBProtocolSSL
995+
enum:
996+
- TCP
997+
- SSL
998+
- HTTP
999+
- HTTPS
1000+
- TLS
1001+
- UDP
9951002
type: string
9961003
loadBalancerType:
9971004
default: classic

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,13 @@ spec:
587587
healthCheckProtocol:
588588
description: HealthCheckProtocol sets the protocol type
589589
for ELB health check target default value is ELBProtocolSSL
590+
enum:
591+
- TCP
592+
- SSL
593+
- HTTP
594+
- HTTPS
595+
- TLS
596+
- UDP
590597
type: string
591598
loadBalancerType:
592599
default: classic

0 commit comments

Comments
 (0)