From 465b79ca50857aa1b426577b25576b69c563571b Mon Sep 17 00:00:00 2001 From: gjmzj Date: Fri, 22 Jun 2018 18:01:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=8B=89=E5=8F=96=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/ingress/traefik-ingress.yaml | 3 ++- manifests/metrics-server/metrics-server-deployment.yaml | 2 +- manifests/nfs-provisioner/nfs-client-provisioner.yaml | 1 + manifests/nfs-provisioner/test/test-pod.yaml | 1 + manifests/nfs-provisioner/test/test.yaml | 1 + roles/kube-router/defaults/main.yml | 4 ++++ roles/kube-router/templates/kuberouter-all.yaml.j2 | 6 +++--- roles/kube-router/templates/kuberouter.yaml.j2 | 6 +++--- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/manifests/ingress/traefik-ingress.yaml b/manifests/ingress/traefik-ingress.yaml index 293d86f..5ee6690 100644 --- a/manifests/ingress/traefik-ingress.yaml +++ b/manifests/ingress/traefik-ingress.yaml @@ -64,7 +64,8 @@ spec: serviceAccountName: traefik-ingress-controller terminationGracePeriodSeconds: 60 containers: - - image: traefik + - image: traefik:v1.6 + imagePullPolicy: IfNotPresent name: traefik-ingress-lb args: - --web diff --git a/manifests/metrics-server/metrics-server-deployment.yaml b/manifests/metrics-server/metrics-server-deployment.yaml index f846a42..40255fc 100644 --- a/manifests/metrics-server/metrics-server-deployment.yaml +++ b/manifests/metrics-server/metrics-server-deployment.yaml @@ -27,7 +27,7 @@ spec: - name: metrics-server #image: gcr.io/google_containers/metrics-server-amd64:v0.2.1 image: mirrorgooglecontainers/metrics-server-amd64:v0.2.1 - imagePullPolicy: Always + imagePullPolicy: IfNotPresent command: - /metrics-server - --source=kubernetes.summary_api:'' diff --git a/manifests/nfs-provisioner/nfs-client-provisioner.yaml b/manifests/nfs-provisioner/nfs-client-provisioner.yaml index 51f464c..b74bad0 100644 --- a/manifests/nfs-provisioner/nfs-client-provisioner.yaml +++ b/manifests/nfs-provisioner/nfs-client-provisioner.yaml @@ -60,6 +60,7 @@ spec: - name: nfs-client-provisioner #image: quay.io/external_storage/nfs-client-provisioner:latest image: jmgao1983/nfs-client-provisioner:latest + imagePullPolicy: IfNotPresent volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes diff --git a/manifests/nfs-provisioner/test/test-pod.yaml b/manifests/nfs-provisioner/test/test-pod.yaml index 44932e0..187482b 100644 --- a/manifests/nfs-provisioner/test/test-pod.yaml +++ b/manifests/nfs-provisioner/test/test-pod.yaml @@ -6,6 +6,7 @@ spec: containers: - name: test-pod image: busybox + imagePullPolicy: IfNotPresent command: - "/bin/sh" args: diff --git a/manifests/nfs-provisioner/test/test.yaml b/manifests/nfs-provisioner/test/test.yaml index ee0a2b8..04eeeb9 100644 --- a/manifests/nfs-provisioner/test/test.yaml +++ b/manifests/nfs-provisioner/test/test.yaml @@ -19,6 +19,7 @@ spec: containers: - name: test image: busybox + imagePullPolicy: IfNotPresent command: - "/bin/sh" args: diff --git a/roles/kube-router/defaults/main.yml b/roles/kube-router/defaults/main.yml index 84cd1ec..a064462 100644 --- a/roles/kube-router/defaults/main.yml +++ b/roles/kube-router/defaults/main.yml @@ -9,3 +9,7 @@ FIREWALL_ENABLE: "true" # service-proxy 支持开关 # 在/etc/ansible/hosts文件的变量'SERVICE_PROXY'定义 +# kube-router 镜像版本 +IMAGE: "cloudnativelabs/kube-router" +PullPolicy: "IfNotPresent" + diff --git a/roles/kube-router/templates/kuberouter-all.yaml.j2 b/roles/kube-router/templates/kuberouter-all.yaml.j2 index 21b5cfc..f7dd505 100644 --- a/roles/kube-router/templates/kuberouter-all.yaml.j2 +++ b/roles/kube-router/templates/kuberouter-all.yaml.j2 @@ -58,8 +58,8 @@ spec: serviceAccountName: kube-router containers: - name: kube-router - image: cloudnativelabs/kube-router - imagePullPolicy: Always + image: {{ IMAGE }} + imagePullPolicy: {{ PullPolicy }} args: - "--run-router=true" - "--run-firewall={{ FIREWALL_ENABLE }}" @@ -94,7 +94,7 @@ spec: initContainers: - name: install-cni image: busybox - imagePullPolicy: Always + imagePullPolicy: {{ PullPolicy }} command: - /bin/sh - -c diff --git a/roles/kube-router/templates/kuberouter.yaml.j2 b/roles/kube-router/templates/kuberouter.yaml.j2 index 7194983..a5257f1 100644 --- a/roles/kube-router/templates/kuberouter.yaml.j2 +++ b/roles/kube-router/templates/kuberouter.yaml.j2 @@ -39,8 +39,8 @@ spec: serviceAccountName: kube-router containers: - name: kube-router - image: cloudnativelabs/kube-router - imagePullPolicy: Always + image: {{ IMAGE }} + imagePullPolicy: {{ PullPolicy }} args: - "--run-router=true" - "--run-firewall={{ FIREWALL_ENABLE }}" @@ -71,7 +71,7 @@ spec: initContainers: - name: install-cni image: busybox - imagePullPolicy: Always + imagePullPolicy: {{ PullPolicy }} command: - /bin/sh - -c