calico.service.j2 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. [Unit]
  2. Description=calico
  3. After={{ openshift_docker_service_name }}.service
  4. Requires={{ openshift_docker_service_name }}.service
  5. [Service]
  6. Restart=always
  7. ExecStartPre=-/usr/bin/docker rm -f calico-node
  8. ExecStart=/usr/bin/docker run --net=host --privileged \
  9. --name=calico-node \
  10. -e WAIT_FOR_DATASTORE=true \
  11. -e FELIX_DEFAULTENDPOINTTOHOSTACTION=ACCEPT \
  12. -e CALICO_IPV4POOL_IPIP={{ calico_ipv4pool_ipip }} \
  13. -e CALICO_IPV4POOL_CIDR={{ openshift.master.sdn_cluster_network_cidr }} \
  14. -e FELIX_IPV6SUPPORT=false \
  15. -e ETCD_ENDPOINTS={{ calico_etcd_endpoints }} \
  16. -v {{ calico_etcd_cert_dir }}:{{ calico_etcd_cert_dir }} \
  17. -e ETCD_CA_CERT_FILE={{ calico_etcd_ca_cert_file }} \
  18. -e ETCD_CERT_FILE={{ calico_etcd_cert_file }} \
  19. -e ETCD_KEY_FILE={{ calico_etcd_key_file }} \
  20. -e CLUSTER_TYPE=origin,bgp \
  21. -e NODENAME={{ openshift.common.hostname }} \
  22. -v {{ calico_log_dir }}:/var/log/calico\
  23. -v /lib/modules:/lib/modules \
  24. -v /var/run/calico:/var/run/calico \
  25. {{ calico_node_image }}
  26. ExecStop=-/usr/bin/docker stop calico-node
  27. [Install]
  28. WantedBy=multi-user.target