Skip to content
Snippets Groups Projects
Unverified Commit e9f4ff22 authored by yydzhou's avatar yydzhou Committed by GitHub
Browse files

fix master node taint removal bug (#7336)

code improvement
parent 668bbe05
No related branches found
No related tags found
No related merge requests found
...@@ -238,7 +238,10 @@ ...@@ -238,7 +238,10 @@
# FIXME(mattymo): from docs: If you don't want to taint your control-plane node, set this field to an empty slice, i.e. `taints: {}` in the YAML file. # FIXME(mattymo): from docs: If you don't want to taint your control-plane node, set this field to an empty slice, i.e. `taints: {}` in the YAML file.
- name: kubeadm | Remove taint for master with node role - name: kubeadm | Remove taint for master with node role
command: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf taint node {{ inventory_hostname }} node-role.kubernetes.io/master:NoSchedule- node-role.kubernetes.io/control-plane:NoSchedule-" command: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf taint node {{ inventory_hostname }} {{ item }}"
delegate_to: "{{ groups['kube-master'] | first }}" delegate_to: "{{ groups['kube-master'] | first }}"
with_items:
- "node-role.kubernetes.io/master:NoSchedule-"
- "node-role.kubernetes.io/control-plane:NoSchedule-"
when: inventory_hostname in groups['kube-node'] when: inventory_hostname in groups['kube-node']
failed_when: false failed_when: false
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment