Skip to content

Commit

Permalink
feature: cluster manager support ctyun creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Maclon9573 committed Oct 12, 2023
1 parent 00b6882 commit 7e99bb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ func (ca *CreateAction) createNodegroup(cls *cmproto.Cluster) error {
}
ng.LaunchTemplate.InitLoginPassword = enPasswd
}
blog.Infof("---------- worker system disk type %s", ng.LaunchTemplate.SystemDisk.DiskType)

err := ca.model.CreateNodeGroup(context.Background(), ng)
if err != nil {
Expand Down Expand Up @@ -516,6 +517,8 @@ func (ca *CreateAction) createClusterTask(ctx context.Context, cls *cmproto.Clus
// encrypt password
if len(cls.Template) != 0 {
for _, t := range cls.Template {
blog.Infof("---------- worker system disk type %s", t.SystemDisk.DiskType)

if t.InitLoginPassword != "" {
enPasswd, err := encrypt.Encrypt(nil, t.InitLoginPassword)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ func generateWorkerNodes(cls *proto.Cluster, vpcId, subnetId uint32, groups []*p
})
}

blog.Infof("---------- worker system disk type %s", ng.LaunchTemplate.SystemDisk.DiskType)
workerNodes = append(workerNodes, &api.WorkerNode{
DataDisks: dataDisks,
ImageName: cls.ClusterBasicSettings.OS,
Expand Down Expand Up @@ -340,6 +341,8 @@ func generateMasterNodes(cls *proto.Cluster, vpcId, subnetId uint32) (*api.Maste
})
}

blog.Infof("---------- master system disk type %s", cls.Template[0].SystemDisk.DiskType)

masterNode := &api.MasterNode{
DataDisks: dataDisks,
ImageName: cls.ClusterBasicSettings.OS,
Expand Down

0 comments on commit 7e99bb6

Please sign in to comment.