mirror of https://github.com/kubernetes/kops.git
Merge pull request #5485 from justinsb/only_decrypt_at_elb_if_have_cert
Only use SSL for ELB if certificate configured
This commit is contained in:
commit
f611347090
|
|
@ -78,13 +78,21 @@ type LoadBalancerListener struct {
|
|||
}
|
||||
|
||||
func (e *LoadBalancerListener) mapToAWS(loadBalancerPort int64) *elb.Listener {
|
||||
return &elb.Listener{
|
||||
l := &elb.Listener{
|
||||
LoadBalancerPort: aws.Int64(loadBalancerPort),
|
||||
Protocol: aws.String("SSL"),
|
||||
InstanceProtocol: aws.String("SSL"),
|
||||
InstancePort: aws.Int64(int64(e.InstancePort)),
|
||||
SSLCertificateId: aws.String(e.SSLCertificateID),
|
||||
}
|
||||
|
||||
if e.SSLCertificateID != "" {
|
||||
l.Protocol = aws.String("SSL")
|
||||
l.InstanceProtocol = aws.String("SSL")
|
||||
l.SSLCertificateId = aws.String(e.SSLCertificateID)
|
||||
} else {
|
||||
l.Protocol = aws.String("TCP")
|
||||
l.InstanceProtocol = aws.String("TCP")
|
||||
}
|
||||
|
||||
return l
|
||||
}
|
||||
|
||||
var _ fi.HasDependencies = &LoadBalancerListener{}
|
||||
|
|
|
|||
Loading…
Reference in New Issue