This commit is contained in:
Chris O'Haver 2018-10-10 15:28:45 -04:00 committed by John Belamaric
parent 8432f14207
commit 974ed086f2
13 changed files with 291 additions and 380 deletions

View file

@ -444,9 +444,12 @@ func (k *Kubernetes) findServices(r recordRequest, zone string) (services []msg.
serviceList = k.APIConn.ServiceList()
endpointsListFunc = func() []*object.Endpoints { return k.APIConn.EndpointsList() }
} else {
idx := object.ServiceKey(r.service, r.namespace)
serviceList = k.APIConn.SvcIndex(idx)
endpointsListFunc = func() []*object.Endpoints { return k.APIConn.EpIndex(idx) }
key := object.ServiceKey(r.namespace, r.service)
s := k.APIConn.SvcIndex(key)
if s != nil {
serviceList = append(serviceList, s)
}
endpointsListFunc = func() []*object.Endpoints { return []*object.Endpoints{k.APIConn.EpIndex(key)} }
}
for _, svc := range serviceList {