fix: add playbook to upgrade kube-vip

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2023-05-30 17:00:55 -04:00
1 parent 7a54ce1a0f
commit 8db5c1abcd
2 files changed
+33

No files matched your search

+6
View File
@@ -37,6 +37,12 @@ tasks:
cmds: cmds:
- ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-installation.yml - ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-installation.yml
upgrade:
desc: Upgrade Kubernetes on the nodes (currently this only upgrades kube-vip)
dir: "{{.ANSIBLE_DIR}}"
cmds:
- ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/cluster-upgrade.yml
nuke: nuke:
desc: Uninstall Kubernetes on the nodes desc: Uninstall Kubernetes on the nodes
dir: "{{.ANSIBLE_DIR}}" dir: "{{.ANSIBLE_DIR}}"
+27
View File
@@ -0,0 +1,27 @@
---
- hosts:
- master
- worker
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- name: Pausing for 5 seconds...
ansible.builtin.pause:
seconds: 5
tasks:
- name: Ensure Kubernetes is running
ansible.builtin.include_role:
name: xanmanning.k3s
public: true
vars:
k3s_state: started
- name: Upgrade kube-vip
when:
- k3s_control_node is defined
- k3s_control_node
ansible.builtin.template:
src: templates/kube-vip-static-pod.yaml.j2
dest: "{{ k3s_server_pod_manifests_dir }}/kube-vip-static-pod.yaml"
mode: preserve