mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-07 02:27:43 +03:00
calico upgrade to v3 (#3086)
* calico upgrade to v3 * update calico_rr version * add missing file * change contents of main.yml as it was left old version * enable network policy by default * remove unneeded task * Fix kubelet calico settings * fix when statement * switch back to node-kubeconfig.yaml
This commit is contained in:
committed by
Matthew Mosesohn
parent
f453567cce
commit
23fd3461bc
26
roles/network_plugin/calico/tasks/upgrade.yml
Normal file
26
roles/network_plugin/calico/tasks/upgrade.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
- name: "Download calico-upgrade tool (force version)"
|
||||
get_url:
|
||||
url: "https://github.com/projectcalico/calico-upgrade/releases/download/{{ calico_upgrade_version }}/calico-upgrade"
|
||||
dest: "{{ bin_dir }}/calico-upgrade"
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
force: yes
|
||||
|
||||
- name: "Create etcdv2 and etcdv3 calicoApiConfig"
|
||||
template:
|
||||
src: "{{ item }}-store.yml.j2"
|
||||
dest: "/etc/calico/{{ item }}.yml"
|
||||
with_items:
|
||||
- "etcdv2"
|
||||
- "etcdv3"
|
||||
|
||||
- name: "Tests data migration (dry-run)"
|
||||
shell: "{{ bin_dir }}/calico-upgrade dry-run --output-dir=/tmp --apiconfigv1 /etc/calico/etcdv2.yml --apiconfigv3 /etc/calico/etcdv3.yml"
|
||||
register: calico_upgrade_test_data
|
||||
failed_when: '"Successfully" not in calico_upgrade_test_data.stdout'
|
||||
|
||||
- name: "If test migration is success continue with calico data real migration"
|
||||
shell: "{{ bin_dir }}/calico-upgrade start --no-prompts --apiconfigv1 /etc/calico/etcdv2.yml --apiconfigv3 /etc/calico/etcdv3.yml --output-dir=/tmp/calico_upgrade"
|
||||
register: calico_upgrade_migration_data
|
||||
Reference in New Issue
Block a user