2017-10-16 06:11:38 +00:00
|
|
|
{
|
|
|
|
"name": "cni0",
|
|
|
|
"cniVersion":"0.3.1",
|
|
|
|
"plugins":[
|
|
|
|
{
|
2018-08-23 14:17:18 +00:00
|
|
|
{% if cloud_provider is defined %}
|
2017-10-16 06:11:38 +00:00
|
|
|
"nodename": "{{ calico_kubelet_name.stdout }}",
|
|
|
|
{% else %}
|
2018-05-14 12:13:51 +00:00
|
|
|
"nodename": "{{ calico_baremetal_nodename }}",
|
2017-10-16 06:11:38 +00:00
|
|
|
{% endif %}
|
|
|
|
"type": "calico",
|
|
|
|
"etcd_endpoints": "{{ etcd_access_addresses }}",
|
2019-01-28 19:03:49 +00:00
|
|
|
"etcd_cert_file": "{{ calico_cert_dir }}/cert.crt",
|
|
|
|
"etcd_key_file": "{{ calico_cert_dir }}/key.pem",
|
|
|
|
"etcd_ca_cert_file": "{{ calico_cert_dir }}/ca_cert.crt",
|
2017-10-16 06:11:38 +00:00
|
|
|
"log_level": "info",
|
|
|
|
"ipam": {
|
2018-02-21 15:16:32 +00:00
|
|
|
"type": "calico-ipam",
|
|
|
|
"assign_ipv4": "true",
|
|
|
|
"ipv4_pools": ["{{ kube_pods_subnet }}"]
|
2017-10-16 06:11:38 +00:00
|
|
|
},
|
2018-08-23 14:17:18 +00:00
|
|
|
{% if enable_network_policy %}
|
2017-10-16 06:11:38 +00:00
|
|
|
"policy": {
|
|
|
|
"type": "k8s"
|
|
|
|
},
|
2018-08-23 14:17:18 +00:00
|
|
|
{%- endif %}
|
|
|
|
{% if calico_mtu is defined and calico_mtu is number %}
|
2017-10-16 06:11:38 +00:00
|
|
|
"mtu": {{ calico_mtu }},
|
2018-08-23 14:17:18 +00:00
|
|
|
{%- endif %}
|
2017-10-16 06:11:38 +00:00
|
|
|
"kubernetes": {
|
2019-01-28 19:03:49 +00:00
|
|
|
"kubeconfig": "{% if calico_version is version('v3.3.0', '>=') %}__KUBECONFIG_FILEPATH__{% else %}{{ kube_config_dir }}/node-kubeconfig.yaml{% endif %}"
|
2017-10-16 06:11:38 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type":"portmap",
|
|
|
|
"capabilities":{
|
|
|
|
"portMappings":true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|