Merge pull request #27515 from mfanjie/ensuredns-multi-clusters

Automatic merge from submit-queue

federation: only reachable endpoint should be treated as healthy

@quinton-hoole it seems all Ingress IP for the same service is treated as healthy, so I made a fix to filter the Ingress without ready endpoints.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
This commit is contained in:
k8s-merge-robot 2016-06-16 17:10:00 -07:00 committed by GitHub
commit 7c97ca596e

View File

@ -44,6 +44,10 @@ func (s *ServiceController) getHealthyEndpoints(clusterName string, cachedServic
return nil, nil, nil, err
}
for _, ingress := range lbStatus.Ingress {
readyEndpoints, ok := cachedService.endpointMap[lbClusterName]
if !ok || readyEndpoints == 0 {
continue
}
var address string
// We should get either an IP address or a hostname - use whichever one we get
if ingress.IP != "" {