From b15940b5d8a069e94463eecdfbf22363bdf8dae8 Mon Sep 17 00:00:00 2001 From: Raul Gonzales Date: Wed, 15 Jun 2022 14:00:09 +0100 Subject: [PATCH] Add support to run with podman in rootless mode using cgroups v2 (#1084) * Update docs with steps to use podman with cgroups (v2) * Fix parse IP address to work with podman --- docs/usage/advanced/podman.md | 21 +++++++++++++++++++++ pkg/runtimes/docker/network.go | 28 +++++++++++++++++++++++----- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/docs/usage/advanced/podman.md b/docs/usage/advanced/podman.md index 8658896f..a1f43be9 100644 --- a/docs/usage/advanced/podman.md +++ b/docs/usage/advanced/podman.md @@ -48,6 +48,26 @@ export DOCKER_SOCK=$XDG_RUNTIME_DIR/podman/podman.sock k3d cluster create ``` +#### Using cgroup (v2) + +By default, a non-root user can only get memory controller and pids controller to be delegated. + +To run properly we need to enable CPU, CPUSET, and I/O delegation + +!!! note "Make sure you're running cgroup v2" + If `/sys/fs/cgroup/cgroup.controllers` is present on your system, you are using v2, otherwise you are using v1. + +```bash +mkdir -p /etc/systemd/system/user@.service.d +cat > /etc/systemd/system/user@.service.d/delegate.conf <