Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The control plane pre-update only implemented for docker #11316

Open
MOZGIII opened this issue Jun 22, 2024 · 0 comments
Open

The control plane pre-update only implemented for docker #11316

MOZGIII opened this issue Jun 22, 2024 · 0 comments

Comments

@MOZGIII
Copy link

MOZGIII commented Jun 22, 2024

I was reading through the whole kubespray and noticed this inconsistency: other container runtimes can potentially be used, but forceful deletion is only implemented for docker.

---
- name: "Pre-upgrade | Delete master manifests if etcd secrets changed"
file:
path: "/etc/kubernetes/manifests/{{ item }}.manifest"
state: absent
with_items:
- ["kube-apiserver", "kube-controller-manager", "kube-scheduler"]
register: kube_apiserver_manifest_replaced
when: etcd_secret_changed | default(false)
- name: "Pre-upgrade | Delete master containers forcefully" # noqa no-handler
shell: "set -o pipefail && docker ps -af name=k8s_{{ item }}* -q | xargs --no-run-if-empty docker rm -f"
args:
executable: /bin/bash
with_items:
- ["kube-apiserver", "kube-controller-manager", "kube-scheduler"]
when: kube_apiserver_manifest_replaced.changed
register: remove_master_container
retries: 10
until: remove_master_container.rc == 0
delay: 1

Is this an overlook, or is there a reason why this is done this way?

Looks like a bug to me, as it is not checked whether docker is even used at all.

Possible fixes:

  • Use crictl there to abstract around the runtime?
  • Run commands with nerdctl for containerd too?
  • ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant