From 9d7077906c321b5b3987b9ebdf1b4f99752ff848 Mon Sep 17 00:00:00 2001 From: shelmingsong Date: Wed, 24 Aug 2022 20:26:24 +0800 Subject: [PATCH] set cgroup slice for crio --- roles/container-engine/cri-o/templates/crio.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/container-engine/cri-o/templates/crio.conf.j2 b/roles/container-engine/cri-o/templates/crio.conf.j2 index 1a25e0929..d209b2bef 100644 --- a/roles/container-engine/cri-o/templates/crio.conf.j2 +++ b/roles/container-engine/cri-o/templates/crio.conf.j2 @@ -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.