update kube-router v0.2.0-beta.9

pull/294/head
gjmzj 2018-08-12 09:24:22 +08:00
parent c7e4ac7d50
commit e10b9e6020
5 changed files with 21 additions and 20 deletions

View File

@ -7,14 +7,14 @@ mirrorgooglecontainers/k8s-dns-sidecar-amd64:1.14.10
# metrics-server 插件
mirrorgooglecontainers/metrics-server-amd64:v0.2.1
# calico 网络插件
calico/node:v3.0.6
calico/cni:v2.0.5
calico/kube-controllers:v2.0.4
calico/node:v3.1.3
calico/cni:v3.1.3
calico/kube-controllers:v3.1.3
# flannel 网络插件
jmgao1983/flannel:v0.10.0-amd64
# kube-router 网络插件
cloudnativelabs/kube-router
busybox
cloudnativelabs/kube-router:v0.2.0-beta.9
busybox:1.28.4
# dashboard 插件
mirrorgooglecontainers/kubernetes-dashboard-amd64:v1.8.3
# pause 基础容器镜像

View File

@ -10,8 +10,10 @@ FIREWALL_ENABLE: "true"
SERVICE_PROXY: "false"
# kube-router 镜像版本
IMAGE: "cloudnativelabs/kube-router"
kube_router_ver: "v0.2.0-beta.9"
busybox_ver: "1.28.4"
PullPolicy: "IfNotPresent"
# kube-router 离线镜像tar包
kuberouter_offline: "kube-router_v0.2.0-beta.7.tar"
kuberouter_offline: "kube-router_{{ kube_router_ver }}.tar"
busybox_offline: "busybox_{{ busybox_ver }}.tar"

View File

@ -18,6 +18,7 @@
template: src=kuberouter.yaml.j2 dest=/opt/kube/kube-system/kube-router/kuberouter.yaml
when: 'SERVICE_PROXY != "true"'
# kube-router 带service proxy (IPVS/LVS)
- name: 停止 kube-proxy 服务
service: name=kube-proxy state=stopped enabled=no
when: 'SERVICE_PROXY == "true"'
@ -28,7 +29,6 @@
when: 'SERVICE_PROXY == "true"'
ignore_errors: true
# kube-router 带service proxy (IPVS/LVS)
- name: 准备配置 kube-router DaemonSet (with IPVS)
template: src=kuberouter-all.yaml.j2 dest=/opt/kube/kube-system/kube-router/kuberouter.yaml
when: 'SERVICE_PROXY == "true"'
@ -39,6 +39,7 @@
with_items:
- "pause_3.1.tar"
- "{{ kuberouter_offline }}"
- "{{ busybox_offline }}"
ignore_errors: true
- name: 获取目录下离线镜像信息
@ -47,14 +48,12 @@
# 如果目录下有离线镜像就把它导入到node节点上
- name: 导入 kube-router的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ kuberouter_offline }}"
when: 'kuberouter_offline in image_info.stdout'
ignore_errors: true
# 如果目录下有离线镜像就把它导入到node节点上
- name: 导入 pause的离线镜像若执行失败可忽略
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/pause_3.1.tar"
when: '"pause_3" in image_info.stdout'
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}"
when: 'item in image_info.stdout'
with_items:
- "pause_3.1.tar"
- "{{ kuberouter_offline }}"
- "{{ busybox_offline }}"
ignore_errors: true
# 只需单节点执行一次

View File

@ -58,7 +58,7 @@ spec:
serviceAccountName: kube-router
containers:
- name: kube-router
image: {{ IMAGE }}
image: cloudnativelabs/kube-router:{{ kube_router_ver }}
imagePullPolicy: {{ PullPolicy }}
args:
- "--run-router=true"
@ -93,7 +93,7 @@ spec:
readOnly: true
initContainers:
- name: install-cni
image: busybox
image: busybox:{{ busybox_ver }}
imagePullPolicy: {{ PullPolicy }}
command:
- /bin/sh

View File

@ -39,7 +39,7 @@ spec:
serviceAccountName: kube-router
containers:
- name: kube-router
image: {{ IMAGE }}
image: cloudnativelabs/kube-router:{{ kube_router_ver }}
imagePullPolicy: {{ PullPolicy }}
args:
- "--run-router=true"
@ -70,7 +70,7 @@ spec:
mountPath: /etc/cni/net.d
initContainers:
- name: install-cni
image: busybox
image: busybox:{{ busybox_ver }}
imagePullPolicy: {{ PullPolicy }}
command:
- /bin/sh