proxy utils: GetNodeAddresses should check if matching addresses were found

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
This commit is contained in:
Andrew Sy Kim
2020-05-26 12:12:00 -04:00
parent a99321c87c
commit f96d35fc11
2 changed files with 11 additions and 2 deletions

View File

@@ -221,6 +221,11 @@ func GetNodeAddresses(cidrs []string, nw NetworkInterfacer) (sets.String, error)
}
}
}
if uniqueAddressList.Len() == 0 {
return nil, fmt.Errorf("no addresses found for cidrs %v", cidrs)
}
return uniqueAddressList, nil
}