2022-03-17 07:28:11 +08:00
|
|
|
[Unit]
|
|
|
|
Description=CRI Interface for Docker Application Container Engine
|
|
|
|
Documentation=https://docs.mirantis.com
|
|
|
|
After=network-online.target firewalld.service docker.service
|
|
|
|
Wants=network-online.target docker.service
|
|
|
|
Requires=cri-dockerd.socket
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=notify
|
2024-10-22 05:54:52 +08:00
|
|
|
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 }} --log-level {{ cri_dockerd_log_level }} {% if enable_dual_stack_networks %}--ipv6-dual-stack=True{% endif %}
|
2022-06-10 19:24:18 +08:00
|
|
|
|
2022-03-17 07:28:11 +08:00
|
|
|
ExecReload=/bin/kill -s HUP $MAINPID
|
|
|
|
TimeoutSec=0
|
|
|
|
RestartSec=2
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
|
|
|
|
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
|
|
|
|
# to make them work for either version of systemd.
|
|
|
|
StartLimitBurst=3
|
|
|
|
|
|
|
|
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
|
|
|
|
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
|
|
|
|
# this option work for either version of systemd.
|
|
|
|
StartLimitInterval=60s
|
|
|
|
|
|
|
|
# Having non-zero Limit*s causes performance problems due to accounting overhead
|
|
|
|
# in the kernel. We recommend using cgroups to do container-local accounting.
|
|
|
|
LimitNOFILE=infinity
|
|
|
|
LimitNPROC=infinity
|
|
|
|
LimitCORE=infinity
|
|
|
|
|
|
|
|
# Comment TasksMax if your systemd version does not support it.
|
|
|
|
# Only systemd 226 and above support this option.
|
|
|
|
TasksMax=infinity
|
|
|
|
Delegate=yes
|
|
|
|
KillMode=process
|
2022-12-31 00:05:30 +08:00
|
|
|
# Set the cgroup slice of the service so that kube reserved takes effect
|
|
|
|
{% if kube_reserved is defined and kube_reserved|bool %}
|
|
|
|
Slice={{ kube_reserved_cgroups_for_service_slice }}
|
|
|
|
{% endif %}
|
2022-03-17 07:28:11 +08:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|