cleanup IPv6 references

only check node IPs when determining hostIP

IP_VERSIONS not IP_FAMILIES

Signed-off-by: Tyler Lloyd <tyler.lloyd@microsoft.com>
This commit is contained in:
Tyler Lloyd
2022-03-23 16:01:35 +00:00
committed by kitfoman
parent 5cc9bd55ad
commit 05ab610f10
2 changed files with 3 additions and 2 deletions

View File

@@ -69,7 +69,8 @@ func getHostIP(p v1.Pod) string {
var hostIP string
for _, addr := range node.Status.Addresses {
if ipMatchesConfig(addr.Address) {
if (addr.Type == v1.NodeInternalIP || addr.Type == v1.NodeExternalIP) &&
ipMatchesConfig(addr.Address) {
hostIP = addr.Address
}
}