Calico: make calico_min_version check relevant (#7939)

* Calico: make calico_min_version check relevant

* Calico: only check currently installed version against the oldest supported version by the previous release
pull/7995/head
Cristian Calin 2021-09-20 17:58:09 +03:00 committed by GitHub
parent ae44aff330
commit 6f7911264f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 11 deletions

View File

@ -199,14 +199,6 @@
- cloud-provider
- facts
- name: Ensure minimum calico version
assert:
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 calico cluster version
shell: "set -o pipefail && {{ bin_dir }}/calicoctl.sh version | grep 'Cluster Version:' | awk '{ print $3}'"
args:
@ -223,8 +215,10 @@
- name: Check that current calico version is enough for upgrade
assert:
that:
- calico_version_on_server.stdout is version( 'v3.0.0', '>=')
msg: "Your version of calico is not fresh enough for upgrade. Minimum version is v3.0.0"
- calico_version_on_server.stdout is version(calico_min_version_required, '>=')
msg: >
Your version of calico is not fresh enough for upgrade.
Minimum version is {{ calico_min_version_required }} supported by the previous kubespray release.
when:
- kube_network_plugin == 'calico'
- 'calico_version_on_server.stdout is defined'

View File

@ -4,6 +4,6 @@
kube_proxy_deployed: "{{ 'addon/kube-proxy' not in kubeadm_init_phases_skip }}"
# The lowest version allowed to upgrade from (same as calico_version in the previous branch)
calico_min_version_required: "v3.15.2"
calico_min_version_required: "v3.17.5"
containerd_min_version_required: "1.3.7"