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

View File

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

View File

@ -29,7 +29,7 @@
copy: src={{ base_dir }}/down/{{ item }} dest=/opt/kube/images/{{ item }} copy: src={{ base_dir }}/down/{{ item }} dest=/opt/kube/images/{{ item }}
when: 'item in download_info.stdout' when: 'item in download_info.stdout'
with_items: with_items:
- "pause_3.1.tar" - "pause.tar"
- "{{ flannel_offline }}" - "{{ flannel_offline }}"
ignore_errors: true ignore_errors: true
@ -41,7 +41,7 @@
- name: 导入 flannel的离线镜像若执行失败可忽略 - name: 导入 flannel的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}" shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}"
with_items: with_items:
- "pause_3.1.tar" - "pause.tar"
- "{{ flannel_offline }}" - "{{ flannel_offline }}"
ignore_errors: true ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'docker'" when: "item in image_info.stdout and CONTAINER_RUNTIME == 'docker'"
@ -49,7 +49,7 @@
- name: 导入 flannel的离线镜像若执行失败可忽略 - name: 导入 flannel的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ item }}" shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ item }}"
with_items: with_items:
- "pause_3.1.tar" - "pause.tar"
- "{{ flannel_offline }}" - "{{ flannel_offline }}"
ignore_errors: true ignore_errors: true
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'containerd'" 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') }}" 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" #SANDBOX_IMAGE: "registry.access.redhat.com/rhel7/pod-infrastructure:latest"
# Kubelet 根目录 # Kubelet 根目录

View File

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

View File

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