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.

44 lines
1.8 KiB

  1. [Unit]
  2. Description=CRI Interface for Docker Application Container Engine
  3. Documentation=https://docs.mirantis.com
  4. After=network-online.target firewalld.service docker.service
  5. Wants=network-online.target docker.service
  6. Requires=cri-dockerd.socket
  7. [Service]
  8. Type=notify
  9. ExecStart={{ bin_dir }}/cri-dockerd --container-runtime-endpoint {{ cri_socket }} --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin --network-plugin=cni --pod-cidr={{ kube_pods_subnet }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_version }} {% if enable_dual_stack_networks %}--ipv6-dual-stack=True{% endif %}
  10. ExecReload=/bin/kill -s HUP $MAINPID
  11. TimeoutSec=0
  12. RestartSec=2
  13. Restart=always
  14. # Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
  15. # Both the old, and new location are accepted by systemd 229 and up, so using the old location
  16. # to make them work for either version of systemd.
  17. StartLimitBurst=3
  18. # Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
  19. # Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
  20. # this option work for either version of systemd.
  21. StartLimitInterval=60s
  22. # Having non-zero Limit*s causes performance problems due to accounting overhead
  23. # in the kernel. We recommend using cgroups to do container-local accounting.
  24. LimitNOFILE=infinity
  25. LimitNPROC=infinity
  26. LimitCORE=infinity
  27. # Comment TasksMax if your systemd version does not support it.
  28. # Only systemd 226 and above support this option.
  29. TasksMax=infinity
  30. Delegate=yes
  31. KillMode=process
  32. # Set the cgroup slice of the service so that kube reserved takes effect
  33. {% if kube_reserved is defined and kube_reserved|bool %}
  34. Slice={{ kube_reserved_cgroups_for_service_slice }}
  35. {% endif %}
  36. [Install]
  37. WantedBy=multi-user.target