kubelet: skip setting the devices cgroup
use the new libcontainer feature of skipping setting the devices cgroup. This is necessary on cgroup v2 to avoid leaking a eBPF program every time the cgroup is re-configured. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -495,6 +495,7 @@ func setResourcesV2(cgroupConfig *libcontainerconfigs.Cgroup) error {
|
||||
Major: libcontainerconfigs.Wildcard,
|
||||
},
|
||||
}
|
||||
cgroupConfig.Resources.SkipDevices = true
|
||||
|
||||
manager, err := cgroupfs2.NewManager(cgroupConfig, cgroupConfig.Path, false)
|
||||
if err != nil {
|
||||
@@ -517,6 +518,7 @@ func (m *cgroupManagerImpl) toResources(resourceConfig *ResourceConfig) *libcont
|
||||
Major: libcontainerconfigs.Wildcard,
|
||||
},
|
||||
},
|
||||
SkipDevices: true,
|
||||
}
|
||||
if resourceConfig == nil {
|
||||
return resources
|
||||
|
Reference in New Issue
Block a user