Merge pull request #70309 from 2rs2ts/ssl-healthchecks

Use SSL health checks for ELBs when backend protocol is SSL/HTTPS
This commit is contained in:
Kubernetes Prow Robot 2019-02-01 14:31:41 -08:00 committed by GitHub
commit b0a455b811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3725,8 +3725,15 @@ func (c *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, apiS
tcpHealthCheckPort = int32(*listener.InstancePort)
break
}
annotationProtocol := strings.ToLower(annotations[ServiceAnnotationLoadBalancerBEProtocol])
var hcProtocol string
if annotationProtocol == "https" || annotationProtocol == "ssl" {
hcProtocol = "SSL"
} else {
hcProtocol = "TCP"
}
// there must be no path on TCP health check
err = c.ensureLoadBalancerHealthCheck(loadBalancer, "TCP", tcpHealthCheckPort, "", annotations)
err = c.ensureLoadBalancerHealthCheck(loadBalancer, hcProtocol, tcpHealthCheckPort, "", annotations)
if err != nil {
return nil, err
}