Skip to content

Commit 2bcb8ae

Browse files
committed
fixed panic on no tls configuration for http2 annotated ingresses
1 parent 0c4182e commit 2bcb8ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/loadbalancer/loadbalancer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,10 @@ func (lbc *LoadBalancerClient) CreateListener(ctx context.Context, lbID string,
640640
}
641641

642642
if listenerProtocol == util.ProtocolHTTP2 {
643+
if sslConfig == nil {
644+
return fmt.Errorf("no TLS configuration provided for a HTTP2 listener at port %d", listenerPort)
645+
}
646+
643647
sslConfig.CipherSuiteName = common.String(util.ProtocolHTTP2DefaultCipherSuite)
644648
}
645649

0 commit comments

Comments
 (0)