Calico upgrade path validation and old version cleanup (#6733)

* calico: add constant calico_min_version_required

and verify current deployed version against it.

* calico: remove upgrade support with data migration

The tool was used pre v3.0.0 and is no longer needed.

* calico: remove old version support from tasks

* calico: remove old ver support from policy ctrl

* calico: remove old ver support from node

* canal: remove old ver support

* remove unused calicoctl download checksums

calico_min_version_required is the oldest version that can be installed
Older versions can be removed.
This commit is contained in:
Hans Feldt
2020-09-24 18:04:06 +02:00
committed by GitHub
parent 50e8a52c74
commit 28073c76ac
19 changed files with 21 additions and 253 deletions

View File

@@ -152,13 +152,13 @@
- name: Ensure minimum calico version
assert:
that: calico_version is version('v3.0.0', '>=')
msg: "calico_version is too low. Minimum version v3.0.0"
that: calico_version is version(calico_min_version_required, '>=')
msg: "calico_version is too low. Minimum version {{ calico_min_version_required }}"
run_once: yes
when:
- kube_network_plugin == 'calico'
- name: "Get current version of calico cluster version"
- name: Get current calico cluster version
shell: "set -o pipefail && {{ bin_dir }}/calicoctl.sh version | grep 'Cluster Version:' | awk '{ print $3}'"
args:
executable: /bin/bash
@@ -171,11 +171,11 @@
when:
- kube_network_plugin == 'calico'
- name: "Check that calico version is enough for upgrade"
- name: Check that current calico version is enough for upgrade
assert:
that:
- calico_version_on_server.stdout is version('v2.6.5', '>=')
msg: "Your version of calico is not fresh enough for upgrade. Minimum version v2.6.5"
- calico_version_on_server.stdout is version(calico_min_version_required, '>=')
msg: "Your version of calico is not fresh enough for upgrade. Minimum version {{ calico_min_version_required }}"
when:
- kube_network_plugin == 'calico'
- 'calico_version_on_server.stdout is defined'