update pause 3.2

pull/833/head
gjmzj 2020-04-10 19:10:30 +08:00
parent 0204a1014d
commit d1f40a1dae
8 changed files with 21 additions and 20 deletions

View File

@ -45,7 +45,7 @@
copy: src={{ base_dir }}/down/{{ item }} dest=/opt/kube/images/{{ item }}
when: 'item in download_info.stdout'
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ calico_offline }}"
ignore_errors: true
@ -57,7 +57,7 @@
- name: 导入 calico的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ calico_offline }}"
ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'docker'"
@ -65,7 +65,7 @@
- name: 导入 calico的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ calico_offline }}"
ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'containerd'"

View File

@ -37,7 +37,7 @@
copy: src={{ base_dir }}/down/{{ item }} dest=/opt/kube/images/{{ item }}
when: 'item in download_info.stdout'
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ cilium_offline }}"
ignore_errors: true
@ -49,7 +49,7 @@
- name: 导入 cilium的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ cilium_offline }}"
ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'docker'"
@ -57,7 +57,7 @@
- name: 导入 cilium的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ cilium_offline }}"
ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'containerd'"

View File

@ -2,7 +2,7 @@
STORAGE_DIR: "/var/lib/containerd"
# 基础容器镜像
SANDBOX_IMAGE: "mirrorgooglecontainers/pause-amd64:3.1"
SANDBOX_IMAGE: "mirrorgooglecontainers/pause-amd64:3.2"
# 启用容器仓库镜像
ENABLE_MIRROR_REGISTRY: true

View File

@ -29,7 +29,7 @@
copy: src={{ base_dir }}/down/{{ item }} dest=/opt/kube/images/{{ item }}
when: 'item in download_info.stdout'
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ flannel_offline }}"
ignore_errors: true
@ -41,7 +41,7 @@
- name: 导入 flannel的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ flannel_offline }}"
ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'docker'"
@ -49,7 +49,7 @@
- name: 导入 flannel的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ flannel_offline }}"
ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'containerd'"

View File

@ -2,7 +2,7 @@
CLUSTER_DNS_SVC_IP: "{{ SERVICE_CIDR | ipaddr('net') | ipaddr(2) | ipaddr('address') }}"
# 基础容器镜像
SANDBOX_IMAGE: "mirrorgooglecontainers/pause-amd64:3.1"
SANDBOX_IMAGE: "mirrorgooglecontainers/pause-amd64:3.2"
#SANDBOX_IMAGE: "registry.access.redhat.com/rhel7/pod-infrastructure:latest"
# Kubelet 根目录

View File

@ -29,7 +29,7 @@
copy: src={{ base_dir }}/down/{{ item }} dest=/opt/kube/images/{{ item }}
when: 'item in download_info.stdout'
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ kube_ovn_offline }}"
ignore_errors: true
@ -41,7 +41,7 @@
- name: 导入 kube_ovn的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ kube_ovn_offline }}"
ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'docker'"
@ -49,7 +49,7 @@
- name: 导入 kube_ovn的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ kube_ovn_offline }}"
ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'containerd'"

View File

@ -28,7 +28,7 @@
copy: src={{ base_dir }}/down/{{ item }} dest=/opt/kube/images/{{ item }}
when: 'item in download_info.stdout'
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ kuberouter_offline }}"
- "{{ busybox_offline }}"
ignore_errors: true
@ -41,7 +41,7 @@
- name: 导入 kube-router的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ kuberouter_offline }}"
- "{{ busybox_offline }}"
ignore_errors: true
@ -50,7 +50,7 @@
- name: 导入 kube-router的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ item }}"
with_items:
- "pause_3.1.tar"
- "pause.tar"
- "{{ kuberouter_offline }}"
- "{{ busybox_offline }}"
ignore_errors: true

View File

@ -184,13 +184,13 @@ function get_sys_pkg() {
function get_offline_image() {
# images needed by k8s cluster
calicoVer=v3.4.4
corednsVer=1.6.6
calicoVer=v3.8.4
corednsVer=1.6.7
dashboardVer=v2.0.0-rc3
dashboardMetricsScraperVer=v1.0.3
flannelVer=v0.11.0-amd64
metricsVer=v0.3.6
pauseVer=3.1
pauseVer=3.2
traefikVer=v1.7.20
imageDir=/etc/ansible/down
@ -227,6 +227,7 @@ function get_offline_image() {
if [[ ! -f "$imageDir/pause_$pauseVer.tar" ]];then
docker pull mirrorgooglecontainers/pause-amd64:${pauseVer} && \
docker save -o ${imageDir}/pause_${pauseVer}.tar mirrorgooglecontainers/pause-amd64:${pauseVer}
/bin/cp -u "${imageDir}/pause_${pauseVer}.tar" "${imageDir}/pause.tar"
fi
if [[ ! -f "$imageDir/traefik_$traefikVer.tar" ]];then
docker pull traefik:${traefikVer} && \