Skip to content

Commit

Permalink
solve the label issue of singlenode through affinity
Browse files Browse the repository at this point in the history
Signed-off-by: hancheng wang <wanghanchengchn@gmail.com>

solve the label issue of singlenode through affinity

Signed-off-by: hancheng wang <wanghanchengchn@gmail.com>
  • Loading branch information
wanghanchengchn authored and lrq619 committed Apr 24, 2024
1 parent 28fbb7a commit 532496d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions scripts/cloudlab/start_onenode_vhive_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ func StartOnenodeVhiveCluster(sandbox string) error {
return err
}

if err = cluster.SetupMasterNode(sandbox); err != nil {
return err
}

utils.InfoPrintf("All logs are stored in %s", ctrdLogDir)
return nil
}
5 changes: 0 additions & 5 deletions scripts/cluster/create_one_node_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ func CreateOneNodeCluster(stockContainerd string) error {
return err
}

err = SetupMasterNode(stockContainerd)
if err != nil {
return err
}

return nil
}

Expand Down
13 changes: 13 additions & 0 deletions scripts/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func main() {
availableCmds := []string{
"create_multinode_cluster",
"create_one_node_cluster",
"prepare_one_node_cluster",
"setup_master_node",
"setup_worker_kubelet",
"setup_node",
Expand Down Expand Up @@ -157,6 +158,18 @@ func main() {
}
utils.InfoPrintf("Create one-node Cluster\n")
err = cluster.CreateOneNodeCluster(setupFlags.Args()[1])
if err == nil {
utils.InfoPrintf("Set up master node\n")
err = cluster.SetupMasterNode(setupFlags.Args()[1])
}
case "prepare_one_node_cluster":
if setupFlags.NArg() < 2 {
utils.FatalPrintf("Missing parameters: %s <stock-containerd>\n", subCmd)
utils.CleanEnvironment()
os.Exit(1)
}
utils.InfoPrintf("Create one-node Cluster\n")
err = cluster.CreateOneNodeCluster(setupFlags.Args()[1])
case "setup_master_node":
if setupFlags.NArg() < 2 {
utils.FatalPrintf("Missing parameters: %s <stock-containerd>\n", subCmd)
Expand Down

0 comments on commit 532496d

Please sign in to comment.