mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
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:
commit
b0a455b811
@ -3725,8 +3725,15 @@ func (c *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, apiS
|
|||||||
tcpHealthCheckPort = int32(*listener.InstancePort)
|
tcpHealthCheckPort = int32(*listener.InstancePort)
|
||||||
break
|
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
|
// 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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user