mirror of https://github.com/easzlab/kubeasz.git
fix:当node多网卡时可以设置参数使flannel/calico正常运行
parent
a86bd89181
commit
6c8b3d64f4
|
@ -1,5 +1,8 @@
|
|||
# 部分calico相关配置,更全配置可以去roles/calico/templates/calico.yaml.j2自定义
|
||||
|
||||
# 如果 node 节点有多块网卡,请设置 true
|
||||
NODE_WITH_MULTIPLE_NETWORKS: "false"
|
||||
|
||||
# etcd 集群服务地址列表, 根据etcd组成员自动生成
|
||||
TMP_ENDPOINTS: "{% for h in groups['etcd'] %}https://{{ h }}:2379,{% endfor %}"
|
||||
ETCD_ENDPOINTS: "{{ TMP_ENDPOINTS.rstrip(',') }}"
|
||||
|
|
|
@ -328,10 +328,12 @@ spec:
|
|||
- name: ENABLED_CONTROLLERS
|
||||
value: policy,profile,workloadendpoint,node
|
||||
# if hosts have multiple net interfaces, set following two ENVs
|
||||
{% if NODE_WITH_MULTIPLE_NETWORKS == 'true' %}
|
||||
- name: KUBERNETES_SERVICE_HOST
|
||||
value: "{{ MASTER_IP }}"
|
||||
- name: KUBERNETES_SERVICE_PORT
|
||||
value: "{{ KUBE_APISERVER.split(':')[2] }}"
|
||||
{% end if %}
|
||||
volumeMounts:
|
||||
# Mount in the etcd TLS secrets.
|
||||
- mountPath: /calico-secrets
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# 部分flannel配置,详见roles/flannel/templates/kube-flannel.yaml.j2
|
||||
|
||||
# 如果 node 节点有多块网卡,请设置 true
|
||||
NODE_WITH_MULTIPLE_NETWORKS: "false"
|
||||
|
||||
# 设置flannel 后端
|
||||
#FLANNEL_BACKEND: "host-gw"
|
||||
FLANNEL_BACKEND: "vxlan"
|
||||
|
|
|
@ -143,11 +143,14 @@ spec:
|
|||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
# if hosts have multiple net interfaces, set following two ENVs
|
||||
{% if NODE_WITH_MULTIPLE_NETWORKS == 'true' %}
|
||||
- name: KUBERNETES_SERVICE_HOST
|
||||
value: "{{ MASTER_IP }}"
|
||||
#value: "{{ KUBE_APISERVER.split(':')[1].lstrip('/') }}"
|
||||
- name: KUBERNETES_SERVICE_PORT
|
||||
value: "{{ KUBE_APISERVER.split(':')[2] }}"
|
||||
{% end if %}
|
||||
volumeMounts:
|
||||
- name: run
|
||||
mountPath: /run
|
||||
|
|
Loading…
Reference in New Issue