2016-12-10 02:44:52 +08:00
|
|
|
---
|
2021-10-06 03:56:58 +08:00
|
|
|
- name: wait for cilium
|
|
|
|
when:
|
|
|
|
- needs_cordoning|default(false)
|
|
|
|
- kube_network_plugin == 'cilium'
|
|
|
|
command: >
|
2022-01-05 18:26:32 +08:00
|
|
|
{{ kubectl }}
|
2021-10-06 03:56:58 +08:00
|
|
|
wait pod -n kube-system -l k8s-app=cilium
|
|
|
|
--field-selector 'spec.nodeName=={{ kube_override_hostname|default(inventory_hostname) }}'
|
|
|
|
--for=condition=Ready
|
|
|
|
--timeout={{ upgrade_post_cilium_wait_timeout }}
|
|
|
|
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
|
|
|
|
2022-02-16 08:39:02 +08:00
|
|
|
- name: Confirm node uncordon
|
|
|
|
pause:
|
|
|
|
echo: yes
|
|
|
|
prompt: "Ready to uncordon node?"
|
|
|
|
when:
|
|
|
|
- upgrade_node_post_upgrade_confirm
|
|
|
|
|
|
|
|
- name: Wait before uncordoning node
|
|
|
|
pause:
|
|
|
|
seconds: "{{ upgrade_node_post_upgrade_pause_seconds }}"
|
|
|
|
when:
|
|
|
|
- not upgrade_node_post_upgrade_confirm
|
|
|
|
- upgrade_node_post_upgrade_pause_seconds != 0
|
|
|
|
|
2016-12-10 02:44:52 +08:00
|
|
|
- name: Uncordon node
|
2022-01-05 18:26:32 +08:00
|
|
|
command: "{{ kubectl }} uncordon {{ kube_override_hostname|default(inventory_hostname) }}"
|
2021-03-24 08:26:05 +08:00
|
|
|
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
2018-02-09 23:39:21 +08:00
|
|
|
when:
|
|
|
|
- needs_cordoning|default(false)
|