From 4a8757161e1a456ae85c8e612c70b846979c0ead Mon Sep 17 00:00:00 2001 From: Cristian Calin <6627509+cristicalin@users.noreply.github.com> Date: Tue, 9 Nov 2021 01:56:49 +0200 Subject: [PATCH] Docker: replace the use of containerd_version with docker_containerd_version to avoid causing conflicts when bumping containerd_version (#8130) --- docs/upgrades.md | 3 ++- docs/vars.md | 3 ++- roles/container-engine/docker/vars/debian-stretch.yml | 2 +- roles/container-engine/docker/vars/debian.yml | 2 +- roles/container-engine/docker/vars/fedora.yml | 2 +- roles/container-engine/docker/vars/redhat.yml | 2 +- roles/container-engine/docker/vars/ubuntu-16.yml | 2 +- roles/container-engine/docker/vars/ubuntu.yml | 2 +- roles/download/defaults/main.yml | 4 ---- roles/kubespray-defaults/defaults/main.yaml | 5 ++++- tests/files/packet_debian9-calico-upgrade-once.yml | 2 +- tests/files/packet_debian9-calico-upgrade.yml | 2 +- tests/files/packet_debian9-macvlan.yml | 2 +- tests/files/packet_ubuntu16-canal-kubeadm-ha.yml | 2 +- tests/files/packet_ubuntu16-canal-sep.yml | 2 +- tests/files/packet_ubuntu16-flannel-ha.yml | 2 +- tests/files/packet_ubuntu16-kube-router-sep.yml | 2 +- tests/files/packet_ubuntu16-kube-router-svc-proxy.yml | 2 +- tests/files/packet_ubuntu16-weave-sep.yml | 2 +- 19 files changed, 23 insertions(+), 22 deletions(-) diff --git a/docs/upgrades.md b/docs/upgrades.md index ad0983b1a..f5fe38049 100644 --- a/docs/upgrades.md +++ b/docs/upgrades.md @@ -7,7 +7,8 @@ You can also individually control versions of components by explicitly defining versions. Here are all version vars for each component: * docker_version -* containerd_version +* docker_containerd_version (relevant when `container_manager` == `docker`) +* containerd_version (relevant when `container_manager` == `containerd`) * kube_version * etcd_version * calico_version diff --git a/docs/vars.md b/docs/vars.md index be812042a..f0d7747d2 100644 --- a/docs/vars.md +++ b/docs/vars.md @@ -18,7 +18,8 @@ Some variables of note include: * *docker_version* - Specify version of Docker to used (should be quoted string). Must match one of the keys defined for *docker_versioned_pkg* in `roles/container-engine/docker/vars/*.yml`. -* *containerd_version* - Specify version of Containerd to use +* *containerd_version* - Specify version of containerd to use when setting `container_manager` to `containerd` +* *docker_containerd_version* - Specify which version of containerd to use when setting `container_manager` to `docker` * *etcd_version* - Specify version of ETCD to use * *ipip* - Enables Calico ipip encapsulation by default * *kube_network_plugin* - Sets k8s network plugin (default Calico) diff --git a/roles/container-engine/docker/vars/debian-stretch.yml b/roles/container-engine/docker/vars/debian-stretch.yml index 3616c64e0..f26f60b1c 100644 --- a/roles/container-engine/docker/vars/debian-stretch.yml +++ b/roles/container-engine/docker/vars/debian-stretch.yml @@ -28,7 +28,7 @@ docker_cli_versioned_pkg: docker_package_info: pkgs: - - "{{ containerd_versioned_pkg[containerd_version | string] }}" + - "{{ containerd_versioned_pkg[docker_containerd_version | string] }}" - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" - "{{ docker_versioned_pkg[docker_version | string] }}" diff --git a/roles/container-engine/docker/vars/debian.yml b/roles/container-engine/docker/vars/debian.yml index 3b0c784bb..36b22c2d7 100644 --- a/roles/container-engine/docker/vars/debian.yml +++ b/roles/container-engine/docker/vars/debian.yml @@ -30,7 +30,7 @@ docker_cli_versioned_pkg: docker_package_info: pkgs: - - "{{ containerd_versioned_pkg[containerd_version | string] }}" + - "{{ containerd_versioned_pkg[docker_containerd_version | string] }}" - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" - "{{ docker_versioned_pkg[docker_version | string] }}" diff --git a/roles/container-engine/docker/vars/fedora.yml b/roles/container-engine/docker/vars/fedora.yml index df5d3597d..278dfe0fe 100644 --- a/roles/container-engine/docker/vars/fedora.yml +++ b/roles/container-engine/docker/vars/fedora.yml @@ -30,6 +30,6 @@ docker_cli_versioned_pkg: docker_package_info: enablerepo: "docker-ce" pkgs: - - "{{ containerd_versioned_pkg[containerd_version | string] }}" + - "{{ containerd_versioned_pkg[docker_containerd_version | string] }}" - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" - "{{ docker_versioned_pkg[docker_version | string] }}" diff --git a/roles/container-engine/docker/vars/redhat.yml b/roles/container-engine/docker/vars/redhat.yml index 8cc897cda..5cc83529e 100644 --- a/roles/container-engine/docker/vars/redhat.yml +++ b/roles/container-engine/docker/vars/redhat.yml @@ -33,6 +33,6 @@ docker_cli_versioned_pkg: docker_package_info: enablerepo: "docker-ce" pkgs: - - "{{ containerd_versioned_pkg[containerd_version | string] }}" + - "{{ containerd_versioned_pkg[docker_containerd_version | string] }}" - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" - "{{ docker_versioned_pkg[docker_version | string] }}" diff --git a/roles/container-engine/docker/vars/ubuntu-16.yml b/roles/container-engine/docker/vars/ubuntu-16.yml index 54046cbe2..78a6ceae4 100644 --- a/roles/container-engine/docker/vars/ubuntu-16.yml +++ b/roles/container-engine/docker/vars/ubuntu-16.yml @@ -29,7 +29,7 @@ docker_cli_versioned_pkg: docker_package_info: pkgs: - - "{{ containerd_versioned_pkg[containerd_version | string] }}" + - "{{ containerd_versioned_pkg[docker_containerd_version | string] }}" - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" - "{{ docker_versioned_pkg[docker_version | string] }}" diff --git a/roles/container-engine/docker/vars/ubuntu.yml b/roles/container-engine/docker/vars/ubuntu.yml index 0fdc778e3..fb85f2406 100644 --- a/roles/container-engine/docker/vars/ubuntu.yml +++ b/roles/container-engine/docker/vars/ubuntu.yml @@ -30,7 +30,7 @@ docker_cli_versioned_pkg: docker_package_info: pkgs: - - "{{ containerd_versioned_pkg[containerd_version | string] }}" + - "{{ containerd_versioned_pkg[docker_containerd_version | string] }}" - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" - "{{ docker_versioned_pkg[docker_version | string] }}" diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index 662cad54c..b1f6cfaf6 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -497,18 +497,14 @@ nerdctl_archive_checksums: amd64: 0.12.1: 868dc5997c3edb0bd06f75012e71c2b15ee0885b83bad191fbe2a1d6d5f4f2ac -# TODO(cristicalin): remove compatibility entries once debian9 and ubuntu16 jobs are dropped or docker is dropped containerd_archive_checksums: arm: - latest: 0 # this is needed to make debian9 and ubuntu16 CI jobs happy 1.4.9: 0 1.5.5: 0 arm64: - latest: 0 # this is needed to make debian9 and ubuntu16 CI jobs happy 1.4.9: 0 1.5.5: 0 amd64: - latest: 0 # this is needed to make debian9 and ubuntu16 CI jobs happy 1.4.9: 346f88ad5b973960ff81b5539d4177af5941ec2e4703b479ca9a6081ff1d023b 1.5.5: 8efc527ffb772a82021800f0151374a3113ed2439922497ff08f2596a70f10f1 diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index 99ee494d7..24345b5a2 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -330,10 +330,13 @@ docker_plugins: [] # Experimental kubeadm etcd deployment mode. Available only for new deployment etcd_kubeadm_enabled: false -# Containerd options +# Containerd options - thse are relevant when container_manager == 'containerd' containerd_version: 1.4.9 containerd_use_systemd_cgroup: true +# Docker options - this is relevant when container_manager == 'docker' +docker_containerd_version: 1.4.9 + # Settings for containerized control plane (etcd/kubelet/secrets) # deployment type for legacy etcd mode etcd_deployment_type: docker diff --git a/tests/files/packet_debian9-calico-upgrade-once.yml b/tests/files/packet_debian9-calico-upgrade-once.yml index 9e4fa1b55..dcf4186c7 100644 --- a/tests/files/packet_debian9-calico-upgrade-once.yml +++ b/tests/files/packet_debian9-calico-upgrade-once.yml @@ -10,4 +10,4 @@ dns_min_replicas: 1 download_run_once: true # Make docker happy -containerd_version: latest +docker_containerd_version: latest diff --git a/tests/files/packet_debian9-calico-upgrade.yml b/tests/files/packet_debian9-calico-upgrade.yml index dd0277024..bc6837a11 100644 --- a/tests/files/packet_debian9-calico-upgrade.yml +++ b/tests/files/packet_debian9-calico-upgrade.yml @@ -9,4 +9,4 @@ deploy_netchecker: true dns_min_replicas: 1 # Make docker happy -containerd_version: latest +docker_containerd_version: latest diff --git a/tests/files/packet_debian9-macvlan.yml b/tests/files/packet_debian9-macvlan.yml index 9a481b2b9..accf275df 100644 --- a/tests/files/packet_debian9-macvlan.yml +++ b/tests/files/packet_debian9-macvlan.yml @@ -14,4 +14,4 @@ macvlan_interface: "eth0" auto_renew_certificates: true # Make docker happy -containerd_version: latest +docker_containerd_version: latest diff --git a/tests/files/packet_ubuntu16-canal-kubeadm-ha.yml b/tests/files/packet_ubuntu16-canal-kubeadm-ha.yml index 9861b3502..ac64817aa 100644 --- a/tests/files/packet_ubuntu16-canal-kubeadm-ha.yml +++ b/tests/files/packet_ubuntu16-canal-kubeadm-ha.yml @@ -10,4 +10,4 @@ deploy_netchecker: true dns_min_replicas: 1 # Make docker jobs happy -containerd_version: latest +docker_containerd_version: latest diff --git a/tests/files/packet_ubuntu16-canal-sep.yml b/tests/files/packet_ubuntu16-canal-sep.yml index 44df4f948..01fcaff88 100644 --- a/tests/files/packet_ubuntu16-canal-sep.yml +++ b/tests/files/packet_ubuntu16-canal-sep.yml @@ -10,4 +10,4 @@ deploy_netchecker: true dns_min_replicas: 1 # Make docker jobs happy -containerd_version: latest +docker_containerd_version: latest diff --git a/tests/files/packet_ubuntu16-flannel-ha.yml b/tests/files/packet_ubuntu16-flannel-ha.yml index 5f3b19d9b..c4af804a1 100644 --- a/tests/files/packet_ubuntu16-flannel-ha.yml +++ b/tests/files/packet_ubuntu16-flannel-ha.yml @@ -12,4 +12,4 @@ deploy_netchecker: true dns_min_replicas: 1 # Make docker jobs happy -containerd_version: latest +docker_containerd_version: latest diff --git a/tests/files/packet_ubuntu16-kube-router-sep.yml b/tests/files/packet_ubuntu16-kube-router-sep.yml index e923834aa..91aa6cbe1 100644 --- a/tests/files/packet_ubuntu16-kube-router-sep.yml +++ b/tests/files/packet_ubuntu16-kube-router-sep.yml @@ -10,4 +10,4 @@ deploy_netchecker: true dns_min_replicas: 1 # Make docker jobs happy -containerd_version: latest +docker_containerd_version: latest diff --git a/tests/files/packet_ubuntu16-kube-router-svc-proxy.yml b/tests/files/packet_ubuntu16-kube-router-svc-proxy.yml index 043639ad9..433557b98 100644 --- a/tests/files/packet_ubuntu16-kube-router-svc-proxy.yml +++ b/tests/files/packet_ubuntu16-kube-router-svc-proxy.yml @@ -12,4 +12,4 @@ dns_min_replicas: 1 kube_router_run_service_proxy: true # Make docker jobs happy -containerd_version: latest +docker_containerd_version: latest diff --git a/tests/files/packet_ubuntu16-weave-sep.yml b/tests/files/packet_ubuntu16-weave-sep.yml index e424a6cc8..22cfe0e51 100644 --- a/tests/files/packet_ubuntu16-weave-sep.yml +++ b/tests/files/packet_ubuntu16-weave-sep.yml @@ -11,4 +11,4 @@ dns_min_replicas: 1 auto_renew_certificates: true # Make docker jobs happy -containerd_version: latest +docker_containerd_version: latest