only remove the taints from control plane

This commit is contained in:
Michael McCulloch 2024-02-05 08:02:35 -07:00
parent 16de20c8e4
commit 5f52f7a337

View File

@ -112,7 +112,7 @@
- not kubernetes_init_stat.stat.exists
- name: Allow pods on control plane (if configured).
command: "kubectl taint nodes --all node-role.kubernetes.io/control-plane-"
command: "kubectl taint nodes {{ item.inventory_hostname_short }} node-role.kubernetes.io/control-plane-"
register: taint_removed
until: >
("untainted" in taint_removed.stdout) or
@ -121,6 +121,7 @@
failed_when: false
retries: 100
delay: 5
loop: "{{ groups['k8s_control_plane'] }}"
when:
- join_ctrl_plane.changed
- inventory_hostname == groups['k8s_control_plane'][0]