From 54cda8001877a351350de9cd06ce38d7aaf2f596 Mon Sep 17 00:00:00 2001 From: Florian Ruynat <16313165+floryut@users.noreply.github.com> Date: Wed, 2 Jun 2021 05:58:39 +0200 Subject: [PATCH] Fix debian docker available version (#7668) --- .../containerd-common/vars/debian-stretch.yml | 2 ++ .../docker/vars/debian-stretch.yml | 34 +++++++++++++++++++ roles/container-engine/docker/vars/debian.yml | 4 +-- roles/container-engine/docker/vars/fedora.yml | 4 +-- roles/container-engine/docker/vars/redhat.yml | 4 +-- roles/container-engine/docker/vars/ubuntu.yml | 4 +-- roles/kubespray-defaults/defaults/main.yaml | 7 +--- tests/files/packet_debian9-calico-upgrade.yml | 3 -- 8 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 roles/container-engine/docker/vars/debian-stretch.yml diff --git a/roles/container-engine/containerd-common/vars/debian-stretch.yml b/roles/container-engine/containerd-common/vars/debian-stretch.yml index 03c63b273..b0a2584c7 100644 --- a/roles/container-engine/containerd-common/vars/debian-stretch.yml +++ b/roles/container-engine/containerd-common/vars/debian-stretch.yml @@ -1,4 +1,6 @@ --- +containerd_version: 1.4.3 + containerd_versioned_pkg: 'latest': "{{ containerd_package }}" '1.3.7': "{{ containerd_package }}=1.3.7-1" diff --git a/roles/container-engine/docker/vars/debian-stretch.yml b/roles/container-engine/docker/vars/debian-stretch.yml new file mode 100644 index 000000000..9ff8ac142 --- /dev/null +++ b/roles/container-engine/docker/vars/debian-stretch.yml @@ -0,0 +1,34 @@ +--- +docker_version: 19.03 +docker_cli_version: 19.03 + +# https://download.docker.com/linux/debian/ +docker_versioned_pkg: + 'latest': docker-ce + '18.09': docker-ce=5:18.09.9~3-0~debian-{{ ansible_distribution_release|lower }} + '19.03': docker-ce=5:19.03.15~3-0~debian-{{ ansible_distribution_release|lower }} + 'stable': docker-ce=5:19.03.15~3-0~debian-{{ ansible_distribution_release|lower }} + 'edge': docker-ce=5:19.03.15~3-0~debian-{{ ansible_distribution_release|lower }} + +docker_cli_versioned_pkg: + 'latest': docker-ce-cli + '18.09': docker-ce-cli=5:18.09.9~3-0~debian-{{ ansible_distribution_release|lower }} + '19.03': docker-ce-cli=5:19.03.15~3-0~debian-{{ ansible_distribution_release|lower }} + +docker_package_info: + pkgs: + - "{{ containerd_versioned_pkg[containerd_version | string] }}" + - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" + - "{{ docker_versioned_pkg[docker_version | string] }}" + +docker_repo_key_info: + url: '{{ docker_debian_repo_gpgkey }}' + repo_keys: + - '{{ docker_debian_repo_repokey }}' + +docker_repo_info: + repos: + - > + deb {{ docker_debian_repo_base_url }} + {{ ansible_distribution_release|lower }} + stable diff --git a/roles/container-engine/docker/vars/debian.yml b/roles/container-engine/docker/vars/debian.yml index bea8821f8..d839044c7 100644 --- a/roles/container-engine/docker/vars/debian.yml +++ b/roles/container-engine/docker/vars/debian.yml @@ -5,8 +5,8 @@ docker_versioned_pkg: '18.09': docker-ce=5:18.09.9~3-0~debian-{{ ansible_distribution_release|lower }} '19.03': docker-ce=5:19.03.15~3-0~debian-{{ ansible_distribution_release|lower }} '20.10': docker-ce=5:20.10.6~3-0~debian-{{ ansible_distribution_release|lower }} - 'stable': docker-ce=5:19.03.15~3-0~debian-{{ ansible_distribution_release|lower }} - 'edge': docker-ce=5:19.03.15~3-0~debian-{{ ansible_distribution_release|lower }} + 'stable': docker-ce=5:20.10.6~3-0~debian-{{ ansible_distribution_release|lower }} + 'edge': docker-ce=5:20.10.6~3-0~debian-{{ ansible_distribution_release|lower }} docker_cli_versioned_pkg: 'latest': docker-ce-cli diff --git a/roles/container-engine/docker/vars/fedora.yml b/roles/container-engine/docker/vars/fedora.yml index 41851dbb6..c2e23272b 100644 --- a/roles/container-engine/docker/vars/fedora.yml +++ b/roles/container-engine/docker/vars/fedora.yml @@ -5,8 +5,8 @@ docker_versioned_pkg: 'latest': docker-ce '19.03': docker-ce-19.03.15-3.fc{{ ansible_distribution_major_version }} '20.10': docker-ce-20.10.6-3.fc{{ ansible_distribution_major_version }} - 'stable': docker-ce-19.03.15-3.fc{{ ansible_distribution_major_version }} - 'edge': docker-ce-19.03.15-3.fc{{ ansible_distribution_major_version }} + 'stable': docker-ce-20.10.6-3.fc{{ ansible_distribution_major_version }} + 'edge': docker-ce-20.10.6-3.fc{{ ansible_distribution_major_version }} docker_cli_versioned_pkg: 'latest': docker-ce-cli diff --git a/roles/container-engine/docker/vars/redhat.yml b/roles/container-engine/docker/vars/redhat.yml index 995939d15..90dd90457 100644 --- a/roles/container-engine/docker/vars/redhat.yml +++ b/roles/container-engine/docker/vars/redhat.yml @@ -7,8 +7,8 @@ docker_versioned_pkg: '18.09': docker-ce-18.09.9-3.el7 '19.03': docker-ce-19.03.15-3.el{{ ansible_distribution_major_version }} '20.10': docker-ce-20.10.6-3.el{{ ansible_distribution_major_version }} - 'stable': docker-ce-19.03.15-3.el{{ ansible_distribution_major_version }} - 'edge': docker-ce-19.03.15-3.el{{ ansible_distribution_major_version }} + 'stable': docker-ce-20.10.6-3.el{{ ansible_distribution_major_version }} + 'edge': docker-ce-20.10.6-3.el{{ ansible_distribution_major_version }} docker_cli_versioned_pkg: 'latest': docker-ce-cli diff --git a/roles/container-engine/docker/vars/ubuntu.yml b/roles/container-engine/docker/vars/ubuntu.yml index 45505dcb4..76a9d0f17 100644 --- a/roles/container-engine/docker/vars/ubuntu.yml +++ b/roles/container-engine/docker/vars/ubuntu.yml @@ -5,8 +5,8 @@ docker_versioned_pkg: '18.09': docker-ce=5:18.09.9~3-0~ubuntu-{{ ansible_distribution_release|lower }} '19.03': docker-ce=5:19.03.15~3-0~ubuntu-{{ ansible_distribution_release|lower }} '20.10': docker-ce=5:20.10.6~3-0~ubuntu-{{ ansible_distribution_release|lower }} - 'stable': docker-ce=5:19.03.15~3-0~ubuntu-{{ ansible_distribution_release|lower }} - 'edge': docker-ce=5:19.03.15~3-0~ubuntu-{{ ansible_distribution_release|lower }} + 'stable': docker-ce=5:20.10.6~3-0~ubuntu-{{ ansible_distribution_release|lower }} + 'edge': docker-ce=5:20.10.6~3-0~ubuntu-{{ ansible_distribution_release|lower }} docker_cli_versioned_pkg: 'latest': docker-ce-cli diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index 8a62b51c9..0b2238130 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -310,12 +310,7 @@ docker_plugins: [] etcd_kubeadm_enabled: false # Containerd options -containerd_version: >- - {%- if ansible_os_family == "Debian" and ansible_distribution_release == "stretch" -%} - 1.4.3 - {%- else -%} - 1.4.4 - {%- endif -%} +containerd_version: 1.4.4 containerd_use_systemd_cgroup: true # Settings for containerized control plane (etcd/kubelet/secrets) diff --git a/tests/files/packet_debian9-calico-upgrade.yml b/tests/files/packet_debian9-calico-upgrade.yml index 90dd472c1..ca5ef1216 100644 --- a/tests/files/packet_debian9-calico-upgrade.yml +++ b/tests/files/packet_debian9-calico-upgrade.yml @@ -7,6 +7,3 @@ mode: default kube_network_plugin: calico deploy_netchecker: true dns_min_replicas: 1 - -# Only docker package 19.03 for Debian9 -docker_version: '19.03'