error when no node address could be found

This commit is contained in:
Reinier Schoof 2019-10-24 16:22:31 +02:00
parent c6943f8c52
commit fee7046e72
2 changed files with 2 additions and 3 deletions

View File

@ -139,8 +139,7 @@ func (ns *nodeSource) Endpoints() ([]*endpoint.Endpoint, error) {
addrs, err := ns.nodeAddresses(node)
if err != nil {
log.Error(err)
continue
return nil, fmt.Errorf("failed to get node address from %s: %s", node.Name, err.Error())
}
ep.Targets = endpoint.Targets(addrs)

View File

@ -175,7 +175,7 @@ func testNodeSourceEndpoints(t *testing.T) {
map[string]string{},
map[string]string{},
[]*endpoint.Endpoint{},
false,
true,
},
{
"annotated node without annotation filter returns endpoint",