From 719cc78efc4ca6cd925bdd0aebc303e72bfd3f40 Mon Sep 17 00:00:00 2001 From: hjoshi123 Date: Wed, 26 Mar 2025 07:49:00 -0600 Subject: [PATCH] removing reduntant code --- source/node.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/node.go b/source/node.go index 8b7532e2c..50ec987c9 100644 --- a/source/node.go +++ b/source/node.go @@ -179,13 +179,12 @@ func (ns *nodeSource) nodeAddresses(node *v1.Node) ([]string, error) { var internalIpv6Addresses []string for _, addr := range node.Status.Addresses { - // IPv6 addresses are labeled as NodeInternalIP despite being usable externally as well. + // IPv6 InternalIP addresses have special handling. + // Refer to https://github.com/kubernetes-sigs/external-dns/pull/5192 for more details. if addr.Type == v1.NodeInternalIP && suitableType(addr.Address) == endpoint.RecordTypeAAAA { - addresses[v1.NodeInternalIP] = append(addresses[v1.NodeInternalIP], addr.Address) internalIpv6Addresses = append(internalIpv6Addresses, addr.Address) - } else { - addresses[addr.Type] = append(addresses[addr.Type], addr.Address) } + addresses[addr.Type] = append(addresses[addr.Type], addr.Address) } if len(addresses[v1.NodeExternalIP]) > 0 {