Hi all,
I have a use case that gives non-root users access to create/destroy cgroup. Cgroup is used for both resource isolation and the ability to reliably kill run-away processes. Our current implementation without containers leverages a pre-configured directory (for example /sys/fs/cgroup/{cpu,cpuset}/user_owned), and gives users r/w access. This way, non-root users can create a subdirectory and configure the right amount of resource, for example.
This doesn't work with k8s/docker for now. K8s currently leverages cpu quota to limit how many cores a container can use (via docker); docker by default mounts /sys/fs/cgroup/{cpu,cpuacct,cpuset}/docker/<container_id>/ as read-only at /sys/fs/cgroup/{cpu,cpuacct,cpuset} inside of a container.
My question is... if I want to allow programs inside of containers to create/destroy children cgroups, what is my best option?
Thanks.
-Simon