Skip to content

Commit

Permalink
handle cases where the internal-ip is already set (e.g. kubelet)
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyDumaine committed Oct 2, 2024
1 parent 291e46f commit 20dee87
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cloud/linode/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@ func (i *instances) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloud
return nil, err
}

for _, addr := range node.Status.Addresses {
if addr.Type == v1.NodeInternalIP {
ips = append(ips, nodeIP{
ip: addr.String(),
ipType: addr.Type,
})
}
}
addresses := []v1.NodeAddress{{Type: v1.NodeHostName, Address: linode.Label}}

for _, ip := range ips {
Expand Down

0 comments on commit 20dee87

Please sign in to comment.