From 28dd8e5d2e7b03afc3546dec6cf77baaefbc4846 Mon Sep 17 00:00:00 2001 From: 24sama Date: Wed, 13 Oct 2021 10:54:10 +0800 Subject: [PATCH] dev-v2.0.0: fix missing arg to install containerd Signed-off-by: 24sama --- cmd/add_nodes.go | 13 +++++++------ cmd/cluster.go | 2 ++ pkg/pipelines/bootstrap/os/module.go | 2 +- pkg/pipelines/common/kube_runtime.go | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cmd/add_nodes.go b/cmd/add_nodes.go index df34a2a9..1cbfb536 100644 --- a/cmd/add_nodes.go +++ b/cmd/add_nodes.go @@ -27,12 +27,13 @@ var addNodesCmd = &cobra.Command{ Short: "Add nodes to the cluster according to the new nodes information from the specified configuration file", RunE: func(cmd *cobra.Command, args []string) error { arg := common.Argument{ - FilePath: opt.ClusterCfgFile, - KsEnable: false, - Debug: opt.Verbose, - SkipCheck: opt.SkipCheck, - SkipPullImages: opt.SkipPullImages, - InCluster: opt.InCluster, + FilePath: opt.ClusterCfgFile, + KsEnable: false, + Debug: opt.Verbose, + SkipCheck: opt.SkipCheck, + SkipPullImages: opt.SkipPullImages, + InCluster: opt.InCluster, + ContainerManager: opt.ContainerManager, } return pipelines.AddNodes(arg, opt.DownloadCmd) }, diff --git a/cmd/cluster.go b/cmd/cluster.go index c859aced..a71042f6 100644 --- a/cmd/cluster.go +++ b/cmd/cluster.go @@ -47,6 +47,7 @@ var clusterCmd = &cobra.Command{ InCluster: opt.InCluster, DeployLocalStorage: opt.LocalStorage, Debug: opt.Verbose, + ContainerManager: opt.ContainerManager, } return pipelines.CreateCluster(arg, opt.DownloadCmd) @@ -62,6 +63,7 @@ func init() { clusterCmd.Flags().BoolVarP(&opt.Kubesphere, "with-kubesphere", "", false, "Deploy a specific version of kubesphere (default v3.1.0)") clusterCmd.Flags().BoolVarP(&opt.SkipCheck, "yes", "y", false, "Skip pre-check of the installation") clusterCmd.Flags().BoolVarP(&opt.SkipPullImages, "skip-pull-images", "", false, "Skip pre pull images") + clusterCmd.Flags().StringVarP(&opt.ContainerManager, "container-manager", "", "docker", "Container runtime: docker, crio, containerd and isula.") clusterCmd.Flags().StringVarP(&opt.DownloadCmd, "download-cmd", "", "curl -L -o %s %s", `The user defined command to download the necessary binary files. The first param '%s' is output path, the second param '%s', is the URL`) diff --git a/pkg/pipelines/bootstrap/os/module.go b/pkg/pipelines/bootstrap/os/module.go index 7fc2f6b5..84408b95 100644 --- a/pkg/pipelines/bootstrap/os/module.go +++ b/pkg/pipelines/bootstrap/os/module.go @@ -125,7 +125,7 @@ func (i *InitDependenciesModule) Init() { offlineInstall := &modules.RemoteTask{ Name: "OnlineInstallDependencies", - Desc: "Online install dependencies", + Desc: "Offline install dependencies", Hosts: i.Runtime.GetAllHosts(), Action: new(OfflineInstallDependencies), Parallel: true, diff --git a/pkg/pipelines/common/kube_runtime.go b/pkg/pipelines/common/kube_runtime.go index 0d1047e0..5b2e11fb 100644 --- a/pkg/pipelines/common/kube_runtime.go +++ b/pkg/pipelines/common/kube_runtime.go @@ -33,6 +33,7 @@ type Argument struct { SourcesDir string DownloadCommand func(path, url string) string InCluster bool + ContainerManager string } func NewKubeRuntime(flag string, arg Argument) (*KubeRuntime, error) {