Skip to content
Snippets Groups Projects
Commit 1e601bb2 authored by Bogdan Dobrelya's avatar Bogdan Dobrelya Committed by GitHub
Browse files

Merge pull request #601 from adidenko/calico_mtu

Move CNI config and add MTU support for calico-cni
parents e587e82f e3470b28
No related branches found
No related tags found
No related merge requests found
...@@ -4,13 +4,6 @@ ...@@ -4,13 +4,6 @@
- include: nginx-proxy.yml - include: nginx-proxy.yml
when: is_kube_master == false and loadbalancer_apiserver_localhost|default(false) when: is_kube_master == false and loadbalancer_apiserver_localhost|default(false)
- name: Write Calico cni config
template:
src: "cni-calico.conf.j2"
dest: "/etc/cni/net.d/10-calico.conf"
owner: kube
when: kube_network_plugin == "calico"
- name: Write kubelet config file - name: Write kubelet config file
template: src=kubelet.j2 dest={{ kube_config_dir }}/kubelet.env backup=yes template: src=kubelet.j2 dest={{ kube_config_dir }}/kubelet.env backup=yes
notify: notify:
......
...@@ -11,3 +11,8 @@ overwrite_hyperkube_cni: true ...@@ -11,3 +11,8 @@ overwrite_hyperkube_cni: true
calico_cert_dir: /etc/calico/certs calico_cert_dir: /etc/calico/certs
etcd_cert_dir: /etc/ssl/etcd/ssl etcd_cert_dir: /etc/ssl/etcd/ssl
# You can set MTU value here. If left undefined or empty, it will
# not be specified in calico CNI config, so Calico will use built-in
# defaults. The value should be a number, not a string.
# calico_mtu: 1500
--- ---
- name: Calico | Write Calico cni config
template:
src: "cni-calico.conf.j2"
dest: "/etc/cni/net.d/10-calico.conf"
owner: kube
- name: Calico | Set docker daemon options - name: Calico | Set docker daemon options
template: template:
src: docker src: docker
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
"policy": { "policy": {
"type": "k8s" "type": "k8s"
}, },
{% endif %}
{% if calico_mtu is defined and calico_mtu is number %}
"mtu": {{ calico_mtu }},
{% endif %} {% endif %}
"kubernetes": { "kubernetes": {
"kubeconfig": "{{ kube_config_dir }}/node-kubeconfig.yaml" "kubeconfig": "{{ kube_config_dir }}/node-kubeconfig.yaml"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment