From a8f57dda860bc122f7ed95a80fb690d88a67fe86 Mon Sep 17 00:00:00 2001 From: fidiler Date: Thu, 27 Aug 2020 10:11:42 +0800 Subject: [PATCH] =?UTF-8?q?roles/calico/defaults/main.yaml=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20CALICO=5FNETWORKING=5FBACKEND=20=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/calico/defaults/main.yml | 3 +++ roles/calico/templates/calico-v3.3.yaml.j2 | 2 +- roles/calico/templates/calico-v3.4.yaml.j2 | 2 +- roles/calico/templates/calico-v3.8.yaml.j2 | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/calico/defaults/main.yml b/roles/calico/defaults/main.yml index bffab4c..f873e5e 100644 --- a/roles/calico/defaults/main.yml +++ b/roles/calico/defaults/main.yml @@ -14,6 +14,9 @@ FELIX_LOG_LVL: "warning" #IP_AUTODETECTION_METHOD: "interface=eth0" IP_AUTODETECTION_METHOD: "can-reach={{ groups['kube-master'][0] }}" +# 设置calico 网络 backend: brid, vxlan, none +CALICO_NETWORKING_BACKEND: "brid" + # 更新支持calico 版本: [v3.3.x] [v3.4.x] [v3.8.x] calicoVer: "v3.8.8" calico_ver: "{{ calicoVer }}" diff --git a/roles/calico/templates/calico-v3.3.yaml.j2 b/roles/calico/templates/calico-v3.3.yaml.j2 index b8c0995..ca2254e 100644 --- a/roles/calico/templates/calico-v3.3.yaml.j2 +++ b/roles/calico/templates/calico-v3.3.yaml.j2 @@ -21,7 +21,7 @@ data: etcd_cert: "/calico-secrets/etcd-cert" etcd_key: "/calico-secrets/etcd-key" # Configure the Calico backend to use. - calico_backend: "bird" + calico_backend: "{{ CALICO_NETWORKING_BACKEND }}" # Configure the MTU to use veth_mtu: "1440" diff --git a/roles/calico/templates/calico-v3.4.yaml.j2 b/roles/calico/templates/calico-v3.4.yaml.j2 index aaeefa5..e23c730 100644 --- a/roles/calico/templates/calico-v3.4.yaml.j2 +++ b/roles/calico/templates/calico-v3.4.yaml.j2 @@ -21,7 +21,7 @@ data: etcd_cert: "/calico-secrets/etcd-cert" etcd_key: "/calico-secrets/etcd-key" # Configure the Calico backend to use. - calico_backend: "bird" + calico_backend: "{{ CALICO_NETWORKING_BACKEND }}" # Configure the MTU to use veth_mtu: "1440" diff --git a/roles/calico/templates/calico-v3.8.yaml.j2 b/roles/calico/templates/calico-v3.8.yaml.j2 index 8bdad68..6f94262 100644 --- a/roles/calico/templates/calico-v3.8.yaml.j2 +++ b/roles/calico/templates/calico-v3.8.yaml.j2 @@ -22,7 +22,7 @@ data: # Typha is disabled. typha_service_name: "none" # Configure the backend to use. - calico_backend: "bird" + calico_backend: "{{ CALICO_NETWORKING_BACKEND }}" # Configure the MTU to use veth_mtu: "1440"