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.

28 lines
1.4 KiB

  1. [Unit]
  2. Description=Calico per-node agent
  3. Documentation=https://github.com/projectcalico/calico-docker
  4. After=docker.service docker.socket
  5. Wants=docker.socket
  6. [Service]
  7. User=root
  8. PermissionsStartOnly=true
  9. {% if legacy_calicoctl %}
  10. {% if inventory_hostname in groups['kube-node'] and peer_with_router|default(false)%}
  11. ExecStart={{ bin_dir }}/calicoctl node --ip={{ip | default(ansible_default_ipv4.address) }} --as={{ local_as }} --detach=false --node-image={{ calico_node_image_repo }}:{{ calico_node_image_tag }}
  12. {% else %}
  13. ExecStart={{ bin_dir }}/calicoctl node --ip={{ip | default(ansible_default_ipv4.address) }} --detach=false --node-image={{ calico_node_image_repo }}:{{ calico_node_image_tag }}
  14. {% endif %}
  15. {% else %}
  16. {% if inventory_hostname in groups['kube-node'] and peer_with_router|default(false)%}
  17. ExecStart={{ bin_dir }}/calicoctl node run --ip={{ip | default(ansible_default_ipv4.address) }} --as={{ local_as }} --node-image={{ calico_node_image_repo }}:{{ calico_node_image_tag }} {% if calico_network_backend is defined %}--backend={{calico_network_backend }}{% endif %}
  18. {% else %}
  19. ExecStart={{ bin_dir }}/calicoctl node run --ip={{ip | default(ansible_default_ipv4.address) }} --node-image={{ calico_node_image_repo }}:{{ calico_node_image_tag }} {% if calico_network_backend is defined %}--backend={{calico_network_backend }}{% endif %}
  20. {% endif %}
  21. {% endif %}
  22. Restart=always
  23. RestartSec=10s
  24. [Install]
  25. WantedBy=multi-user.target