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
864 B

  1. [Unit]
  2. Description=calico-rr
  3. After=docker.service
  4. Requires=docker.service
  5. [Service]
  6. EnvironmentFile=/etc/calico/calico-rr.env
  7. ExecStartPre=-{{ docker_bin_dir }}/docker rm -f calico-rr
  8. ExecStart={{ docker_bin_dir }}/docker run --net=host --privileged \
  9. --name=calico-rr \
  10. -e IP=${IP} \
  11. -e IP6=${IP6} \
  12. -e ETCD_ENDPOINTS=${ETCD_ENDPOINTS} \
  13. -e ETCD_CA_CERT_FILE=${ETCD_CA_CERT_FILE} \
  14. -e ETCD_CERT_FILE=${ETCD_CERT_FILE} \
  15. -e ETCD_KEY_FILE=${ETCD_KEY_FILE} \
  16. -v /var/log/calico-rr:/var/log/calico \
  17. -v {{ calico_cert_dir }}:{{ calico_cert_dir }}:ro \
  18. --memory={{ calico_rr_memory_limit|regex_replace('Mi', 'M') }} --cpu-shares={{ calico_rr_cpu_limit|regex_replace('m', '') }} \
  19. {{ calico_rr_image_repo }}:{{ calico_rr_image_tag }}
  20. Restart=always
  21. RestartSec=10s
  22. ExecStop=-{{ docker_bin_dir }}/docker stop calico-rr
  23. [Install]
  24. WantedBy=multi-user.target