optimize cgroups settings for node reserved (#9209)

* optimize cgroups settings for node reserved

* fix

* set cgroup slice for multi container engine

* set cgroup slice for crio

* add reserved cgroups variables to sample files

* Compatible with cgroup path for different container managers

* add cgroups doc

* fix markdown
This commit is contained in:
Shelming.Song
2022-12-31 00:05:30 +08:00
committed by GitHub
parent 744c81d451
commit 1c4db6132d
9 changed files with 147 additions and 4 deletions

View File

@@ -113,8 +113,12 @@ conmon = "{{ crio_conmon }}"
{% if crio_cgroup_manager == "cgroupfs" %}
conmon_cgroup = "pod"
{% else %}
{% if kube_reserved is defined and kube_reserved|bool %}
conmon_cgroup = "{{ kube_reserved_cgroups_for_service_slice }}
{% else %}
conmon_cgroup = "system.slice"
{% endif %}
{% endif %}
# Environment variable list for the conmon process, used for passing necessary
# environment variables to conmon or the runtime.