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.

23 lines
628 B

  1. [Unit]
  2. Description=calicoctl node
  3. After=etcd2.service
  4. [Service]
  5. EnvironmentFile=/etc/network-environment
  6. User=root
  7. PermissionsStartOnly=true
  8. ExecStartPre={{ bin_dir }}/calicoctl checksystem --fix
  9. {% if inventory_hostname in groups['kube-node'] %}
  10. {% if peer_with_router %}
  11. ExecStart={{ bin_dir }}/calicoctl node --ip=${DEFAULT_IPV4} --as={{ local_as }} --kubernetes
  12. {% else %}
  13. ExecStart={{ bin_dir }}/calicoctl node --ip=${DEFAULT_IPV4} --kubernetes
  14. {% endif %}
  15. {% else %}
  16. ExecStart={{ bin_dir }}/calicoctl node --ip=${DEFAULT_IPV4}
  17. {% endif %}
  18. RemainAfterExit=yes
  19. Type=oneshot
  20. [Install]
  21. WantedBy=multi-user.target