add public IP to the end of endpoint list

This commit is contained in:
Pavel Sviderski
2024-09-06 15:06:50 +10:00
parent 7e93abb972
commit cfa2105684
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ func (m *Machine) InitCluster(machineName string, netPrefix netip.Prefix, users
publicIP, err := network.GetPublicIP()
// Ignore the error if failed to get the public IP using API services.
if err == nil {
ips = append([]netip.Addr{publicIP}, ips...)
ips = append(ips, publicIP)
}
endpoints := make([]*pb.IPPort, len(ips))
for i, addr := range ips {