mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
Restart canal after scale or upgrade. Just like PR#4531, but for canal (#4992)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
fe29c97ae8
commit
49d921cf91
14
roles/network_plugin/canal/handlers/main.yml
Normal file
14
roles/network_plugin/canal/handlers/main.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
- name: reset_canal_cni
|
||||||
|
command: /bin/true
|
||||||
|
notify:
|
||||||
|
- delete 10-canal.conflist
|
||||||
|
- delete canal-node containers
|
||||||
|
|
||||||
|
- name: delete 10-canal.conflist
|
||||||
|
file:
|
||||||
|
path: /etc/canal/10-canal.conflist
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: delete canal-node containers
|
||||||
|
shell: "docker ps -af name=k8s_POD_canal-node* -q | xargs --no-run-if-empty docker rm -f"
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
src: "cni-canal.conflist.j2"
|
src: "cni-canal.conflist.j2"
|
||||||
dest: "/etc/cni/net.d/{% if calico_version is version('v3.3.0', '>=') %}canal.conflist.template{% else %}10-canal.conflist{% endif %}"
|
dest: "/etc/cni/net.d/{% if calico_version is version('v3.3.0', '>=') %}canal.conflist.template{% else %}10-canal.conflist{% endif %}"
|
||||||
owner: kube
|
owner: kube
|
||||||
|
register: canal_conflist
|
||||||
|
notify: reset_canal_cni
|
||||||
|
|
||||||
- name: Canal | Create canal certs directory
|
- name: Canal | Create canal certs directory
|
||||||
file:
|
file:
|
||||||
|
|||||||
Reference in New Issue
Block a user