mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
PR feedback - do not change protocol for externalTrafficPolicy = Local
This commit is contained in:
parent
7a8357554e
commit
72895a84a9
@ -3589,16 +3589,9 @@ func (c *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, apiS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
annotationProtocol := strings.ToLower(annotations[ServiceAnnotationLoadBalancerBEProtocol])
|
|
||||||
var hcProtocol string
|
|
||||||
if path, healthCheckNodePort := service.GetServiceHealthCheckPathPort(apiService); path != "" {
|
if path, healthCheckNodePort := service.GetServiceHealthCheckPathPort(apiService); path != "" {
|
||||||
klog.V(4).Infof("service %v (%v) needs health checks on :%d%s)", apiService.Name, loadBalancerName, healthCheckNodePort, path)
|
klog.V(4).Infof("service %v (%v) needs health checks on :%d%s)", apiService.Name, loadBalancerName, healthCheckNodePort, path)
|
||||||
if annotationProtocol == "https" || annotationProtocol == "ssl" {
|
err = c.ensureLoadBalancerHealthCheck(loadBalancer, "HTTP", healthCheckNodePort, path, annotations)
|
||||||
hcProtocol = "HTTPS"
|
|
||||||
} else {
|
|
||||||
hcProtocol = "HTTP"
|
|
||||||
}
|
|
||||||
err = c.ensureLoadBalancerHealthCheck(loadBalancer, hcProtocol, healthCheckNodePort, path, annotations)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Failed to ensure health check for localized service %v on node port %v: %q", loadBalancerName, healthCheckNodePort, err)
|
return nil, fmt.Errorf("Failed to ensure health check for localized service %v on node port %v: %q", loadBalancerName, healthCheckNodePort, err)
|
||||||
}
|
}
|
||||||
@ -3613,6 +3606,8 @@ 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" {
|
if annotationProtocol == "https" || annotationProtocol == "ssl" {
|
||||||
hcProtocol = "SSL"
|
hcProtocol = "SSL"
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user