mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 19:58:07 +03:00
Enable containerd to deploy vanilla containerd package (#4951)
* Enable containerd to deploy vanilla containerd package Fixes kubeadm references to CRI socket for containerd Fixes download role cache feature to work with containerd Change-Id: I2ab8f0031107e2f0d1a85c39b4beb66f08509a01 * use containerd for flannel-addons job Change-Id: Ied375c7d65e64a625ffbd995ff16f2374067dee6 * add containerd vars Change-Id: Ib9a8a04e501c481a86235413cbec63f3672baf91 * fixup vars Change-Id: Ibea64e4b18405a578b52a13da100384582aa24c2 * more fixes * fix rh repo Change-Id: I00575a77cfb7b81d6095db5d918a52023c8f13ba * Adjust helm host install for containerd
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
a038d62644
commit
29307740dd
@@ -5,8 +5,7 @@
|
||||
# It will output something like the following:
|
||||
# nginx:1.15,gcr.io/google-containers/kube-proxy:v1.14.1,gcr.io/google-containers/kube-proxy@sha256:44af2833c6cbd9a7fc2e9d2f5244a39dfd2e31ad91bf9d4b7d810678db738ee9,gcr.io/google-containers/kube-apiserver:v1.14.1,etc...
|
||||
- name: check_pull_required | Generate a list of information about the images on a node
|
||||
shell: >-
|
||||
{{ docker_bin_dir }}/docker images -q | xargs -r {{ docker_bin_dir }}/docker inspect -f "{{ '{{' }} if .RepoTags {{ '}}' }}{{ '{{' }} (index .RepoTags) {{ '}}' }}{{ '{{' }} end {{ '}}' }}{{ '{{' }} if .RepoDigests {{ '}}' }},{{ '{{' }} (index .RepoDigests) {{ '}}' }}{{ '{{' }} end {{ '}}' }}" | sed -e 's/^ *\[//g' -e 's/\] *$//g' -e 's/ /\n/g' | tr '\n' ','
|
||||
shell: "{{ image_info_command }}"
|
||||
delegate_to: "{{ download_delegate if download_run_once or inventory_hostname }}"
|
||||
no_log: true
|
||||
register: docker_images
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
- ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"]
|
||||
|
||||
- name: download_container | Prepare container download
|
||||
import_tasks: check_pull_required.yml
|
||||
include_tasks: check_pull_required.yml
|
||||
run_once: "{{ download_run_once }}"
|
||||
when:
|
||||
- not download_always_pull
|
||||
|
||||
@@ -24,10 +24,11 @@
|
||||
|
||||
- include_tasks: ../../container-engine/containerd/tasks/crictl.yml
|
||||
when:
|
||||
- not skip_downloads|default(false)
|
||||
- container_manager in ['containerd', 'crio']
|
||||
|
||||
- name: download | Get kubeadm binary and list of required images
|
||||
import_tasks: prep_kubeadm_images.yml
|
||||
include_tasks: prep_kubeadm_images.yml
|
||||
when:
|
||||
- kube_version is version('v1.11.0', '>=')
|
||||
- not skip_downloads|default(false)
|
||||
|
||||
@@ -5,6 +5,20 @@
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- name: Set image info command for containerd
|
||||
set_fact:
|
||||
image_info_command: "{{ containerd_bin_dir }}/ctr images ls | tail -n +2 | awk -F '[ :]+' '{print $1\":\"$2\",\"$1\":\"$4\"@\"$5}' | tr '\n' ','"
|
||||
when: container_manager == 'containerd'
|
||||
|
||||
- name: Register docker images info
|
||||
shell: "{{ image_info_command }}"
|
||||
no_log: true
|
||||
register: docker_images
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
when: download_container
|
||||
|
||||
- name: prep_download | Create staging directory on remote node
|
||||
file:
|
||||
path: "{{ local_release_dir }}/images"
|
||||
|
||||
@@ -13,3 +13,9 @@ etcd:
|
||||
{% for endpoint in etcd_access_addresses.split(',') %}
|
||||
- {{ endpoint }}
|
||||
{% endfor %}
|
||||
{% if dns_mode in ['coredns', 'coredns_dual'] %}
|
||||
dns:
|
||||
type: CoreDNS
|
||||
imageRepository: {{ coredns_image_repo | regex_replace('/coredns$','') }}
|
||||
imageTag: {{ coredns_image_tag }}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user