mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
fix(typo): containerd
This commit is contained in:
parent
ba5daf3653
commit
6bcf235ddc
|
|
@ -94,7 +94,7 @@ const (
|
|||
DefaultOpenEBSBasePath = "/var/openebs/local"
|
||||
|
||||
Docker = "docker"
|
||||
Conatinerd = "containerd"
|
||||
Containerd = "containerd"
|
||||
Crio = "crio"
|
||||
Isula = "isula"
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ func SetDefaultClusterCfg(cfg *ClusterSpec) Kubernetes {
|
|||
cfg.Kubernetes.ContainerRuntimeEndpoint = ""
|
||||
case Crio:
|
||||
cfg.Kubernetes.ContainerRuntimeEndpoint = DefaultCrioEndpoint
|
||||
case Conatinerd:
|
||||
case Containerd:
|
||||
cfg.Kubernetes.ContainerRuntimeEndpoint = DefaultContainerdEndpoint
|
||||
case Isula:
|
||||
cfg.Kubernetes.ContainerRuntimeEndpoint = DefaultIsulaEndpoint
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ func (o *MigrateCriOptions) Validate() error {
|
|||
if o.Type == "" {
|
||||
return errors.New("cri Type can not be empty")
|
||||
}
|
||||
if o.Type != common.Docker && o.Type != common.Conatinerd {
|
||||
if o.Type != common.Docker && o.Type != common.Containerd {
|
||||
return errors.Errorf("cri Type is invalid: %s", o.Type)
|
||||
}
|
||||
if o.ClusterCfgFile == "" {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ func (o *CreateClusterOptions) Complete(cmd *cobra.Command, args []string) error
|
|||
|
||||
func (o *CreateClusterOptions) Validate(_ *cobra.Command, _ []string) error {
|
||||
switch o.ContainerManager {
|
||||
case common.Docker, common.Conatinerd, common.Crio, common.Isula:
|
||||
case common.Docker, common.Containerd, common.Crio, common.Isula:
|
||||
default:
|
||||
return fmt.Errorf("unsupport container runtime [%s]", o.ContainerManager)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ func NewCmdCreateImages() *cobra.Command {
|
|||
|
||||
func (o *CreateImagesOptions) Validate(_ *cobra.Command, _ []string) error {
|
||||
switch o.ContainerManager {
|
||||
case common.Docker, common.Conatinerd, common.Crio, common.Isula:
|
||||
case common.Docker, common.Containerd, common.Crio, common.Isula:
|
||||
default:
|
||||
return fmt.Errorf("unsupport container runtime [%s]", o.ContainerManager)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func K8sFilesDownloadHTTP(kubeConf *common.KubeConf, path, version, arch string,
|
|||
|
||||
if kubeConf.Cluster.Kubernetes.ContainerManager == kubekeyapiv1alpha2.Docker {
|
||||
binaries = append(binaries, docker)
|
||||
} else if kubeConf.Cluster.Kubernetes.ContainerManager == kubekeyapiv1alpha2.Conatinerd {
|
||||
} else if kubeConf.Cluster.Kubernetes.ContainerManager == kubekeyapiv1alpha2.Containerd {
|
||||
binaries = append(binaries, containerd, runc)
|
||||
}
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ func CriDownloadHTTP(kubeConf *common.KubeConf, path, arch string, pipelineCache
|
|||
case common.Docker:
|
||||
docker := files.NewKubeBinary("docker", arch, kubekeyapiv1alpha2.DefaultDockerVersion, path, kubeConf.Arg.DownloadCommand)
|
||||
binaries = append(binaries, docker)
|
||||
case common.Conatinerd:
|
||||
case common.Containerd:
|
||||
containerd := files.NewKubeBinary("containerd", arch, kubekeyapiv1alpha2.DefaultContainerdVersion, path, kubeConf.Arg.DownloadCommand)
|
||||
runc := files.NewKubeBinary("runc", arch, kubekeyapiv1alpha2.DefaultRuncVersion, path, kubeConf.Arg.DownloadCommand)
|
||||
crictl := files.NewKubeBinary("crictl", arch, kubekeyapiv1alpha2.DefaultCrictlVersion, path, kubeConf.Arg.DownloadCommand)
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ func (i *CriBinariesModule) Init() {
|
|||
switch i.KubeConf.Arg.Type {
|
||||
case common.Docker:
|
||||
i.Tasks = CriBinaries(i)
|
||||
case common.Conatinerd:
|
||||
case common.Containerd:
|
||||
i.Tasks = CriBinaries(i)
|
||||
default:
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const (
|
|||
|
||||
Docker = "docker"
|
||||
Crictl = "crictl"
|
||||
Conatinerd = "containerd"
|
||||
Containerd = "containerd"
|
||||
Crio = "crio"
|
||||
Isula = "isula"
|
||||
Runc = "runc"
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ func GenerateKubeKeyConfig(arg common.Argument, name string) error {
|
|||
|
||||
if k8sVersion, err := versionutil.ParseGeneric(opt.KubeVersion); err == nil {
|
||||
if k8sVersion.AtLeast(versionutil.MustParseSemantic("v1.24.0")) {
|
||||
opt.ContainerManager = common.Conatinerd
|
||||
opt.ContainerManager = common.Containerd
|
||||
} else {
|
||||
opt.ContainerManager = common.Docker
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ func (s *SyncContainerd) Execute(runtime connector.Runtime) error {
|
|||
}
|
||||
binariesMap := binariesMapObj.(map[string]*files.KubeBinary)
|
||||
|
||||
containerd, ok := binariesMap[common.Conatinerd]
|
||||
containerd, ok := binariesMap[common.Containerd]
|
||||
if !ok {
|
||||
return errors.New("get KubeBinary key containerd by pipeline cache failed")
|
||||
}
|
||||
|
|
@ -226,7 +226,7 @@ func (i *RestartCri) Execute(runtime connector.Runtime) error {
|
|||
if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("systemctl daemon-reload && systemctl restart docker "), true); err != nil {
|
||||
return errors.Wrap(err, "restart docker")
|
||||
}
|
||||
case common.Conatinerd:
|
||||
case common.Containerd:
|
||||
if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("systemctl daemon-reload && systemctl restart containerd"), true); err != nil {
|
||||
return errors.Wrap(err, "restart containerd")
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ func (i *EditKubeletCri) Execute(runtime connector.Runtime) error {
|
|||
true); err != nil {
|
||||
return errors.Wrap(err, "Change KubeletTo Containerd failed")
|
||||
}
|
||||
case common.Conatinerd:
|
||||
case common.Containerd:
|
||||
if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf(
|
||||
"sed -i 's#--network-plugin=cni --pod#--network-plugin=cni --container-runtime=remote --container-runtime-endpoint=unix:///run/containerd/containerd.sock --pod#' /var/lib/kubelet/kubeadm-flags.env"),
|
||||
true); err != nil {
|
||||
|
|
@ -333,7 +333,7 @@ func MigrateSelfNodeCriTasks(runtime connector.Runtime, kubeAction common.KubeAc
|
|||
Parallel: false,
|
||||
}
|
||||
tasks = append(tasks, CordonNode, DrainNode, Uninstall)
|
||||
case common.Conatinerd:
|
||||
case common.Containerd:
|
||||
Uninstall := &task.RemoteTask{
|
||||
Name: "UninstallContainerd",
|
||||
Desc: "Uninstall containerd",
|
||||
|
|
@ -418,7 +418,7 @@ func MigrateSelfNodeCriTasks(runtime connector.Runtime, kubeAction common.KubeAc
|
|||
tasks = append(tasks, syncBinaries, generateDockerService, generateDockerConfig, enableDocker, dockerLoginRegistry,
|
||||
RestartCri, EditKubeletCri, RestartKubeletNode, UnCordonNode)
|
||||
}
|
||||
if kubeAction.KubeConf.Arg.Type == common.Conatinerd {
|
||||
if kubeAction.KubeConf.Arg.Type == common.Containerd {
|
||||
syncContainerd := &task.RemoteTask{
|
||||
Name: "SyncContainerd",
|
||||
Desc: "Sync containerd binaries",
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func (i *InstallContainerModule) Init() {
|
|||
switch i.KubeConf.Cluster.Kubernetes.ContainerManager {
|
||||
case common.Docker:
|
||||
i.Tasks = InstallDocker(i)
|
||||
case common.Conatinerd:
|
||||
case common.Containerd:
|
||||
i.Tasks = InstallContainerd(i)
|
||||
case common.Crio:
|
||||
// TODO: Add the steps of cri-o's installation.
|
||||
|
|
@ -263,7 +263,7 @@ func (i *UninstallContainerModule) Init() {
|
|||
switch i.KubeConf.Cluster.Kubernetes.ContainerManager {
|
||||
case common.Docker:
|
||||
i.Tasks = UninstallDocker(i)
|
||||
case common.Conatinerd:
|
||||
case common.Containerd:
|
||||
i.Tasks = UninstallContainerd(i)
|
||||
case common.Crio:
|
||||
// TODO: Add the steps of cri-o's installation.
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ func GetKubeletCgroupDriver(runtime connector.Runtime, kubeConf *common.KubeConf
|
|||
cmd = "docker info | grep 'Cgroup Driver'"
|
||||
case common.Crio:
|
||||
cmd = "crio config | grep cgroup_manager"
|
||||
case common.Conatinerd:
|
||||
case common.Containerd:
|
||||
cmd = "containerd config dump | grep SystemdCgroup || echo 'SystemdCgroup = false'"
|
||||
case common.Isula:
|
||||
cmd = "isula info | grep 'Cgroup Driver'"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ func (d *DeployPluginsModule) Init() {
|
|||
d.Name = "DeployPluginsModule"
|
||||
d.Desc = "Deploy plugins for cluster"
|
||||
|
||||
if d.KubeConf.Cluster.Kubernetes.EnableKataDeploy() && (d.KubeConf.Cluster.Kubernetes.ContainerManager == common.Conatinerd || d.KubeConf.Cluster.Kubernetes.ContainerManager == common.Crio) {
|
||||
if d.KubeConf.Cluster.Kubernetes.EnableKataDeploy() && (d.KubeConf.Cluster.Kubernetes.ContainerManager == common.Containerd || d.KubeConf.Cluster.Kubernetes.ContainerManager == common.Crio) {
|
||||
d.Tasks = append(d.Tasks, DeployKataTasks(d)...)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue