mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 19:58:07 +03:00
Fix calico handler for containerd (#4985)
crictl tool must be used to delete containers in case of containerd deployment
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
70dc222719
commit
428e52e0d1
@@ -3,12 +3,18 @@
|
|||||||
command: /bin/true
|
command: /bin/true
|
||||||
notify:
|
notify:
|
||||||
- delete 10-calico.conflist
|
- delete 10-calico.conflist
|
||||||
- delete calico-node containers
|
- docker | delete calico-node containers
|
||||||
|
- containerd | delete calico-node containers
|
||||||
|
|
||||||
- name: delete 10-calico.conflist
|
- name: delete 10-calico.conflist
|
||||||
file:
|
file:
|
||||||
path: /etc/calico/10-calico.conflist
|
path: /etc/cni/net.d/10-calico.conflist
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: delete calico-node containers
|
- name: docker | delete calico-node containers
|
||||||
shell: "docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty docker rm -f"
|
shell: "docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty docker rm -f"
|
||||||
|
when: container_manager in ["docker"]
|
||||||
|
|
||||||
|
- name: containerd | delete calico-node containers
|
||||||
|
shell: 'crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c "crictl stopp % && crictl rmp %"'
|
||||||
|
when: container_manager in ["crio", "containerd"]
|
||||||
|
|||||||
Reference in New Issue
Block a user