You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

  1. {
  2. "name": "cni0",
  3. "cniVersion":"0.3.1",
  4. "plugins":[
  5. {
  6. {% if cloud_provider is defined %}
  7. "nodename": "{{ calico_kubelet_name.stdout }}",
  8. {% else %}
  9. "nodename": "{{ calico_baremetal_nodename }}",
  10. {% endif %}
  11. "type": "calico",
  12. "etcd_endpoints": "{{ etcd_access_addresses }}",
  13. "etcd_cert_file": "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem",
  14. "etcd_key_file": "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}-key.pem",
  15. "etcd_ca_cert_file": "{{ etcd_cert_dir }}/ca.pem",
  16. "log_level": "info",
  17. "ipam": {
  18. "type": "calico-ipam",
  19. "assign_ipv4": "true",
  20. "ipv4_pools": ["{{ kube_pods_subnet }}"]
  21. },
  22. {% if enable_network_policy %}
  23. "policy": {
  24. "type": "k8s"
  25. },
  26. {%- endif %}
  27. {% if calico_mtu is defined and calico_mtu is number %}
  28. "mtu": {{ calico_mtu }},
  29. {%- endif %}
  30. "kubernetes": {
  31. "kubeconfig": "{{ kube_config_dir }}/node-kubeconfig.yaml"
  32. }
  33. },
  34. {
  35. "type":"portmap",
  36. "capabilities":{
  37. "portMappings":true
  38. }
  39. }
  40. ]
  41. }