mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 12:03:33 +00:00
feat(dns): configure and store public IP when initialising machine
This commit is contained in:
@@ -558,6 +558,12 @@ func (m *Machine) InitCluster(ctx context.Context, req *pb.InitClusterRequest) (
|
||||
PublicKey: m.state.Network.PublicKey,
|
||||
},
|
||||
}
|
||||
if req.GetPublicIp() != nil {
|
||||
addReq.PublicIp = req.GetPublicIp()
|
||||
} else if req.GetPublicIpAuto() {
|
||||
addReq.PublicIp = pb.NewIP(publicIP)
|
||||
}
|
||||
|
||||
addResp, err := m.cluster.AddMachine(ctx, addReq)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "add machine to cluster: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user