Skip to content

Commit 5e06350

Browse files
committed
fix: Default to TCP protocol when proto empty
When createLoadBalancerRule is called with an empty protocol, the API will return the loadbalancerrule without a protocol field defined when calling listLoadBalancerRules. CloudStack appears to default to TCP in this case, but this is not reflected in listLoadBalancerRulesResponse
1 parent 52df887 commit 5e06350

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cloudstack/protocol.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ func ProtocolFromServicePort(port corev1.ServicePort, service *corev1.Service) L
101101
// CloudStack load balancer protocol name.
102102
func ProtocolFromLoadBalancer(protocol string) LoadBalancerProtocol {
103103
switch protocol {
104+
case "":
105+
fallthrough
104106
case ProtoTCP:
105107
return LoadBalancerProtocolTCP
106108
case ProtoUDP:

0 commit comments

Comments
 (0)