Skip to content

Commit

Permalink
增加flannel vxlan可选开启DirectRouting特性
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Jul 29, 2019
1 parent 6bc2150 commit 68dd18a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/flannel/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# 设置flannel 后端
#FLANNEL_BACKEND: "host-gw"
FLANNEL_BACKEND: "vxlan"
DIRECT_ROUTING: false

#flanneld_image: "quay.io/coreos/flannel:v0.10.0-amd64"
flanneld_image: "easzlab/flannel:v0.11.0-amd64"
Expand Down
3 changes: 3 additions & 0 deletions roles/flannel/templates/kube-flannel.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ data:
{
"Network": "{{ CLUSTER_CIDR }}",
"Backend": {
{% if FLANNEL_BACKEND == "vxlan" and DIRECT_ROUTING %}
"DirectRouting": true,
{% endif %}
"Type": "{{ FLANNEL_BACKEND }}"
}
}
Expand Down

0 comments on commit 68dd18a

Please sign in to comment.