k8s taint module
This commit is contained in:
@ -94,6 +94,9 @@
|
||||
content: "{{ calico_default_apiserver | to_nice_yaml }}"
|
||||
dest: "{{ ansible_search_path[0] }}/files/calico/calico_apiserver.yaml"
|
||||
|
||||
# TODO two api versions exist for BGP, one only becomes available after calico is online. Do they both work??
|
||||
# crd.projectcalico.org/v1
|
||||
# projectcalico.org/v3
|
||||
- name: write out calico bgp peer definition
|
||||
ansible.builtin.copy:
|
||||
content: "{{ calico_bgp_peer | to_nice_yaml }}"
|
||||
|
7
ansible/roles/k8s_taint/tasks/main.yaml
Normal file
7
ansible/roles/k8s_taint/tasks/main.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: loop remove_taint for control plane nodes # This allows scheduling workloads on control plane nodes
|
||||
with_items:
|
||||
- "{{ groups['k8s_control'] }}"
|
||||
loop_control:
|
||||
loop_var: node
|
||||
ansible.builtin.include_tasks: remove_taint.yaml
|
9
ansible/roles/k8s_taint/tasks/remove_taint.yaml
Normal file
9
ansible/roles/k8s_taint/tasks/remove_taint.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: remove control-plane taint from control-plane nodes # terminology 'control-plane' replaced 'master' in v1.20, ~Dec 2020
|
||||
when: hostvars[node].k8s_remove_control_plane_taint | default(false)
|
||||
kubernetes.core.k8s_taint:
|
||||
name: "{{ node }}"
|
||||
state: absent
|
||||
taints:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/control-plane
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
- name: debug hostname
|
||||
ansible.builtin.lineinfile:
|
||||
line: 192.168.199.240 k8s.balsillie.net
|
||||
insertafter: EOF
|
||||
path: /etc/hosts
|
||||
- name: install calicoctl
|
||||
community.general.pacman:
|
||||
name: calicoctl
|
||||
state: latest
|
||||
update_cache: yes
|
||||
executable: pikaur
|
Reference in New Issue
Block a user