mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
only reachable endpoint should be treated as healthy
This commit is contained in:
parent
77419c48fd
commit
8630e46336
@ -44,6 +44,10 @@ func (s *ServiceController) getHealthyEndpoints(clusterName string, cachedServic
|
|||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
}
|
}
|
||||||
for _, ingress := range lbStatus.Ingress {
|
for _, ingress := range lbStatus.Ingress {
|
||||||
|
readyEndpoints, ok := cachedService.endpointMap[lbClusterName]
|
||||||
|
if !ok || readyEndpoints == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
var address string
|
var address string
|
||||||
// We should get either an IP address or a hostname - use whichever one we get
|
// We should get either an IP address or a hostname - use whichever one we get
|
||||||
if ingress.IP != "" {
|
if ingress.IP != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user