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.

39 lines
1.0 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": "{{ ansible_hostname }}",
  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. },
  20. {% if enable_network_policy %}
  21. "policy": {
  22. "type": "k8s"
  23. },
  24. {% endif %}
  25. {% if calico_mtu is defined and calico_mtu is number %}
  26. "mtu": {{ calico_mtu }},
  27. {% endif %}
  28. "kubernetes": {
  29. "kubeconfig": "{{ kube_config_dir }}/node-kubeconfig.yaml"
  30. }
  31. },
  32. {
  33. "type":"portmap",
  34. "capabilities":{
  35. "portMappings":true
  36. }
  37. }
  38. ]
  39. }