Compatible with cgroup path for different container managers

This commit is contained in:
shelmingsong 2022-08-25 11:51:38 +08:00
parent 0be76d7a8c
commit 044b631ff8

View file

@ -12,11 +12,11 @@ kube_resolv_conf: "/etc/resolv.conf"
kubelet_enforce_node_allocatable: "\"\"" kubelet_enforce_node_allocatable: "\"\""
# Set runtime and kubelet cgroups when using systemd as cgroup driver (default) # Set runtime and kubelet cgroups when using systemd as cgroup driver (default)
kubelet_runtime_cgroups: "{{ kube_reserved_cgroups }}/containerd.service" kubelet_runtime_cgroups: "{{ kube_reserved_cgroups }}/{{ container_manager }}.service"
kubelet_kubelet_cgroups: "{{ kube_reserved_cgroups }}/kubelet.service" kubelet_kubelet_cgroups: "{{ kube_reserved_cgroups }}/kubelet.service"
# Set runtime and kubelet cgroups when using cgroupfs as cgroup driver # Set runtime and kubelet cgroups when using cgroupfs as cgroup driver
kubelet_runtime_cgroups_cgroupfs: "/system.slice/containerd.service" kubelet_runtime_cgroups_cgroupfs: "/system.slice/{{ container_manager }}.service"
kubelet_kubelet_cgroups_cgroupfs: "/system.slice/kubelet.service" kubelet_kubelet_cgroups_cgroupfs: "/system.slice/kubelet.service"
### fail with swap on (default true) ### fail with swap on (default true)