转移calico/flannel的配置到对应的roles目录

pull/243/merge
jmgao 2018-06-09 17:57:17 +08:00
parent e45a023985
commit 2340b9f214
7 changed files with 45 additions and 46 deletions

View File

@ -29,7 +29,7 @@ DEPLOY_MODE=allinone
MASTER_IP="192.168.1.1" MASTER_IP="192.168.1.1"
#集群 APISERVER #集群 APISERVER
KUBE_APISERVER="https://192.168.1.1:6443" KUBE_APISERVER="https://{{ MASTER_IP }}:6443"
#TLS Bootstrapping 使用的 Token使用 head -c 16 /dev/urandom | od -An -t x | tr -d ' ' 生成 #TLS Bootstrapping 使用的 Token使用 head -c 16 /dev/urandom | od -An -t x | tr -d ' ' 生成
BOOTSTRAP_TOKEN="d18f94b5fa585c7123f56803d925d2e7" BOOTSTRAP_TOKEN="d18f94b5fa585c7123f56803d925d2e7"
@ -37,15 +37,6 @@ BOOTSTRAP_TOKEN="d18f94b5fa585c7123f56803d925d2e7"
# 集群网络插件目前支持calico和flannel # 集群网络插件目前支持calico和flannel
CLUSTER_NETWORK="flannel" CLUSTER_NETWORK="flannel"
# 部分calico相关配置更全配置可以去roles/calico/templates/calico.yaml.j2自定义
# 设置 CALICO_IPV4POOL_IPIP=“off”,可以提高网络性能,条件限制详见 05.安装calico网络组件.md
CALICO_IPV4POOL_IPIP="always"
# 设置 calico-node使用的host IPbgp邻居通过该地址建立可手动指定端口"interface=eth0"或使用如下自动发现
IP_AUTODETECTION_METHOD="can-reach=223.5.5.5"
# 部分flannel配置详见roles/flannel/templates/kube-flannel.yaml.j2
FLANNEL_BACKEND="vxlan"
# 服务网段 (Service CIDR部署前路由不可达部署后集群内使用 IP:Port 可达 # 服务网段 (Service CIDR部署前路由不可达部署后集群内使用 IP:Port 可达
SERVICE_CIDR="10.68.0.0/16" SERVICE_CIDR="10.68.0.0/16"

View File

@ -46,7 +46,7 @@ DEPLOY_MODE=multi-master
#集群 MASTER IP即 LB节点VIP地址为区别与默认apiserver端口设置VIP监听的服务端口8443 #集群 MASTER IP即 LB节点VIP地址为区别与默认apiserver端口设置VIP监听的服务端口8443
MASTER_IP="192.168.1.10" MASTER_IP="192.168.1.10"
KUBE_APISERVER="https://192.168.1.10:8443" KUBE_APISERVER="https://{{ MASTER_IP }}:8443"
#TLS Bootstrapping 使用的 Token使用 head -c 16 /dev/urandom | od -An -t x | tr -d ' ' 生成 #TLS Bootstrapping 使用的 Token使用 head -c 16 /dev/urandom | od -An -t x | tr -d ' ' 生成
BOOTSTRAP_TOKEN="c30302226d4b810e08731702d3890f50" BOOTSTRAP_TOKEN="c30302226d4b810e08731702d3890f50"
@ -54,15 +54,6 @@ BOOTSTRAP_TOKEN="c30302226d4b810e08731702d3890f50"
# 集群网络插件目前支持calico和flannel # 集群网络插件目前支持calico和flannel
CLUSTER_NETWORK="flannel" CLUSTER_NETWORK="flannel"
# 部分calico相关配置更全配置可以去roles/calico/templates/calico.yaml.j2自定义
# 设置 CALICO_IPV4POOL_IPIP=“off”,可以提高网络性能,条件限制详见 05.安装calico网络组件.md
CALICO_IPV4POOL_IPIP="always"
# 设置 calico-node使用的host IPbgp邻居通过该地址建立可手动指定端口"interface=eth0"或使用如下自动发现
IP_AUTODETECTION_METHOD="can-reach=223.5.5.5"
# 部分flannel配置详见roles/flannel/templates/kube-flannel.yaml.j2
FLANNEL_BACKEND="vxlan"
# 服务网段 (Service CIDR部署前路由不可达部署后集群内使用 IP:Port 可达 # 服务网段 (Service CIDR部署前路由不可达部署后集群内使用 IP:Port 可达
SERVICE_CIDR="10.68.0.0/16" SERVICE_CIDR="10.68.0.0/16"

View File

@ -33,7 +33,7 @@ DEPLOY_MODE=single-master
MASTER_IP="192.168.1.1" MASTER_IP="192.168.1.1"
#集群 APISERVER #集群 APISERVER
KUBE_APISERVER="https://192.168.1.1:6443" KUBE_APISERVER="https://{{ MASTER_IP }}:6443"
#TLS Bootstrapping 使用的 Token使用 head -c 16 /dev/urandom | od -An -t x | tr -d ' ' 生成 #TLS Bootstrapping 使用的 Token使用 head -c 16 /dev/urandom | od -An -t x | tr -d ' ' 生成
BOOTSTRAP_TOKEN="d18f94b5fa585c7123f56803d925d2e7" BOOTSTRAP_TOKEN="d18f94b5fa585c7123f56803d925d2e7"
@ -41,15 +41,6 @@ BOOTSTRAP_TOKEN="d18f94b5fa585c7123f56803d925d2e7"
# 集群网络插件目前支持calico和flannel # 集群网络插件目前支持calico和flannel
CLUSTER_NETWORK="flannel" CLUSTER_NETWORK="flannel"
# 部分calico相关配置更全配置可以去roles/calico/templates/calico.yaml.j2自定义
# 设置 CALICO_IPV4POOL_IPIP=“off”,可以提高网络性能,条件限制详见 05.安装calico网络组件.md
CALICO_IPV4POOL_IPIP="always"
# 设置 calico-node使用的host IPbgp邻居通过该地址建立可手动指定端口"interface=eth0"或使用如下自动发现
IP_AUTODETECTION_METHOD="can-reach=223.5.5.5"
# 部分flannel配置详见roles/flannel/templates/kube-flannel.yaml.j2
FLANNEL_BACKEND="vxlan"
# 服务网段 (Service CIDR部署前路由不可达部署后集群内使用 IP:Port 可达 # 服务网段 (Service CIDR部署前路由不可达部署后集群内使用 IP:Port 可达
SERVICE_CIDR="10.68.0.0/16" SERVICE_CIDR="10.68.0.0/16"

View File

@ -0,0 +1,17 @@
# 部分calico相关配置更全配置可以去roles/calico/templates/calico.yaml.j2自定义
# 设置 CALICO_IPV4POOL_IPIP=“off”,可以提高网络性能,条件限制详见 05.安装calico网络组件.md
CALICO_IPV4POOL_IPIP: "always"
# 设置 Felix 日志级别
FELIX_LOG_LVL: "warning"
# 设置 calico-node使用的host IPbgp邻居通过该地址建立可手工指定也可以自动发现
#IP_AUTODETECTION_METHOD: "interface=eth0"
IP_AUTODETECTION_METHOD: "can-reach={{ MASTER_IP }}"
calico_node_ver: "v3.0.6"
calico_cni_ver: "v2.0.5"
calico_kube_controller_ver: "v2.0.4"

View File

@ -1,9 +1,9 @@
# Calico Version v3.0.6 # Calico Version {{ calico_node_ver }}
# https://docs.projectcalico.org/v3.0/releases#v3.0.6 # https://docs.projectcalico.org/v3.0/releases#{{ calico_node_ver }}
# This manifest includes the following component versions: # This manifest includes the following component versions:
# calico/node:v3.0.6 # calico/node:{{ calico_node_ver }}
# calico/cni:v2.0.5 # calico/cni:{{ calico_cni_ver }}
# calico/kube-controllers:v2.0.4 # calico/kube-controllers:{{ calico_kube_controller_ver }}
# This ConfigMap is used to configure a self-hosted Calico installation. # This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap kind: ConfigMap
@ -102,8 +102,8 @@ spec:
# container programs network policy and routes on each # container programs network policy and routes on each
# host. # host.
- name: calico-node - name: calico-node
#image: quay.io/calico/node:v3.0.6 #image: quay.io/calico/node:{{ calico_node_ver }}
image: calico/node:v3.0.6 image: calico/node:{{ calico_node_ver }}
env: env:
# The location of the Calico etcd cluster. # The location of the Calico etcd cluster.
- name: ETCD_ENDPOINTS - name: ETCD_ENDPOINTS
@ -141,7 +141,7 @@ spec:
value: "false" value: "false"
# Set Felix logging to "warning" # Set Felix logging to "warning"
- name: FELIX_LOGSEVERITYSCREEN - name: FELIX_LOGSEVERITYSCREEN
value: "warning" value: {{ FELIX_LOG_LVL }}
# Set MTU for tunnel device used if ipip is enabled # Set MTU for tunnel device used if ipip is enabled
- name: FELIX_IPINIPMTU - name: FELIX_IPINIPMTU
value: "1440" value: "1440"
@ -199,8 +199,8 @@ spec:
# This container installs the Calico CNI binaries # This container installs the Calico CNI binaries
# and CNI network config file on each node. # and CNI network config file on each node.
- name: install-cni - name: install-cni
#image: quay.io/calico/cni:v2.0.5 #image: quay.io/calico/cni:{{ calico_cni_ver }}
image: calico/cni:v2.0.5 image: calico/cni:{{ calico_cni_ver }}
command: ["/install-cni.sh"] command: ["/install-cni.sh"]
env: env:
# Name of the CNI config file to create. # Name of the CNI config file to create.
@ -282,8 +282,8 @@ spec:
serviceAccountName: calico-kube-controllers serviceAccountName: calico-kube-controllers
containers: containers:
- name: calico-kube-controllers - name: calico-kube-controllers
#image: quay.io/calico/kube-controllers:v2.0.4 #image: quay.io/calico/kube-controllers:{{ calico_kube_controller_ver }}
image: calico/kube-controllers:v2.0.4 image: calico/kube-controllers:{{ calico_kube_controller_ver }}
env: env:
# The location of the Calico etcd cluster. # The location of the Calico etcd cluster.
- name: ETCD_ENDPOINTS - name: ETCD_ENDPOINTS

View File

@ -0,0 +1,11 @@
# 部分flannel配置详见roles/flannel/templates/kube-flannel.yaml.j2
# 设置flannel 后端
#FLANNEL_BACKEND: "host-gw"
FLANNEL_BACKEND: "vxlan"
#install_cni_image: "quay.io/coreos/flannel:v0.10.0-amd64"
install_cni_image: "jmgao1983/flannel:v0.10.0-amd64"
#flanneld_image: "quay.io/coreos/flannel:v0.10.0-amd64"
flanneld_image: "jmgao1983/flannel:v0.10.0-amd64"

View File

@ -104,8 +104,7 @@ spec:
serviceAccountName: flannel serviceAccountName: flannel
initContainers: initContainers:
- name: install-cni - name: install-cni
image: jmgao1983/flannel:v0.10.0-amd64 image: {{ install_cni_image }}
#image: quay.io/coreos/flannel:v0.10.0-amd64
command: command:
- cp - cp
args: args:
@ -119,8 +118,7 @@ spec:
mountPath: /etc/kube-flannel/ mountPath: /etc/kube-flannel/
containers: containers:
- name: kube-flannel - name: kube-flannel
#image: quay.io/coreos/flannel:v0.10.0-amd64 image: {{ flanneld_image }}
image: jmgao1983/flannel:v0.10.0-amd64
command: command:
- /opt/bin/flanneld - /opt/bin/flanneld
args: args: