Files
kubespray/roles/upgrade/post-upgrade/tasks/main.yml
Matthias Lohr 925f60247a Make cordon/uncordon confirmation prompts consistent (#13313)
Mention cordon explicitly in the pre-upgrade prompt and add the node
name plus the same continue/cancel hint to the uncordon prompt so both
prompts share consistent wording.
2026-06-24 11:38:21 +00:00

37 lines
1.2 KiB
YAML

---
- name: Wait for cilium
when:
- needs_cordoning | default(false)
- kube_network_plugin == 'cilium'
command: >
{{ kubectl }}
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] }}"
- name: Confirm node uncordon
pause:
echo: true
prompt: "Ready to uncordon node {{ kube_override_hostname | default(inventory_hostname) }}? (Press Enter to continue or Ctrl+C for other options)"
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
- name: Run post upgrade hooks before uncordon
loop: "{{ post_upgrade_hooks | default([]) }}"
ansible.builtin.include_tasks: "{{ item }}"
- name: Uncordon node
command: "{{ kubectl }} uncordon {{ kube_override_hostname | default(inventory_hostname) }}"
delegate_to: "{{ groups['kube_control_plane'][0] }}"
when:
- needs_cordoning | default(false)