diff --git a/commands/upgrade_kubectlkubelet.go b/commands/upgrade_kubectlkubelet.go index 8120cf4..1b01450 100644 --- a/commands/upgrade_kubectlkubelet.go +++ b/commands/upgrade_kubectlkubelet.go @@ -64,19 +64,13 @@ func runUpgradeKubectlAndKubelet(spec *operatorv1.UpgradeKubeletAndKubeactlComma return err } - // TODO stop kubelet and replace it - cmd = newCmd("/usr/bin/cp", "-f", "/usr/bin/kubelet-"+spec.KubernetesVersion, "/usr/bin/kubelet") + // see https://github.com/pacoxu/kubelet-reloader/ to add a daemon or service on nodes to replace kubelet and restart kubelet. + cmd = newCmd("/usr/bin/cp", "-f", "/usr/bin/kubelet-"+spec.KubernetesVersion, "/usr/bin/kubelet-new") start, err = cmd.RunAndCapture() if err != nil { - // skip kubelet replacement - cmd = newCmd("/usr/bin/cp", "-f", "/usr/bin/kubelet-"+spec.KubernetesVersion, "/usr/bin/kubelet-new") - start, err = cmd.RunAndCapture() - if err != nil { - } - // return errors.WithStack(errors.WithMessage(err, strings.Join(start, "\n"))) + return errors.WithStack(errors.WithMessage(err, strings.Join(start, "\n"))) } else { log.Info(fmt.Sprintf("%s", strings.Join(start, "\n"))) } - return nil } diff --git a/config/crd/bases/operator.kubeadm.x-k8s.io_operations.yaml b/config/crd/bases/operator.kubeadm.x-k8s.io_operations.yaml index 199dca4..99ad2c6 100644 --- a/config/crd/bases/operator.kubeadm.x-k8s.io_operations.yaml +++ b/config/crd/bases/operator.kubeadm.x-k8s.io_operations.yaml @@ -255,8 +255,7 @@ spec: - kubernetesVersion type: object kubeadmUpgradeKubeProxy: - description: KubeadmUpgradeApplyCommandSpec - provides... + description: not implemented yet properties: kubernetesVersion: description: KubernetesVersion specifies diff --git a/config/crd/bases/operator.kubeadm.x-k8s.io_runtimetaskgroups.yaml b/config/crd/bases/operator.kubeadm.x-k8s.io_runtimetaskgroups.yaml index e2d3739..071f8b6 100644 --- a/config/crd/bases/operator.kubeadm.x-k8s.io_runtimetaskgroups.yaml +++ b/config/crd/bases/operator.kubeadm.x-k8s.io_runtimetaskgroups.yaml @@ -209,7 +209,7 @@ spec: - kubernetesVersion type: object kubeadmUpgradeKubeProxy: - description: KubeadmUpgradeApplyCommandSpec provides... + description: not implemented yet properties: kubernetesVersion: description: KubernetesVersion specifies the target diff --git a/config/crd/bases/operator.kubeadm.x-k8s.io_runtimetasks.yaml b/config/crd/bases/operator.kubeadm.x-k8s.io_runtimetasks.yaml index 9effd9a..cb2ff85 100644 --- a/config/crd/bases/operator.kubeadm.x-k8s.io_runtimetasks.yaml +++ b/config/crd/bases/operator.kubeadm.x-k8s.io_runtimetasks.yaml @@ -90,7 +90,7 @@ spec: - kubernetesVersion type: object kubeadmUpgradeKubeProxy: - description: KubeadmUpgradeApplyCommandSpec provides... + description: not implemented yet properties: kubernetesVersion: description: KubernetesVersion specifies the target kubernetes diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 6a241e3..e850c67 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -43,7 +43,7 @@ spec: name: manager resources: limits: - cpu: 100m + cpu: 200m memory: 30Mi requests: cpu: 100m