Add docker-rootless-cgroup module for cgroup v2 delegation

Rootless Docker only gets cgroup v2 controllers delegated when systemd
sets Delegate=yes on the user session. Kasm images have no systemd, so
the daemon comes up with CgroupDriver=none and `kind create cluster`
fails. This module reproduces that delegation by hand: evacuates the
cgroup-namespace root, delegates controllers into a user-owned /rootless
slice, installs a PATH shim that gives the daemon a private cgroup leaf
so it can self-evacuate, and restarts it. Guarded to no-op on systemd,
rootful, and non-Docker hosts; wired into bootstrap.sh last.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-08 11:53:46 -04:00
co-authored by Claude Opus 4.8
parent 39f638b8db
commit eff01b1b0b
4 changed files with 175 additions and 0 deletions
+3
View File
@@ -33,3 +33,6 @@ fi
"$SCRIPT_DIR/git/install.sh"
"$SCRIPT_DIR/bin/install.sh"
"$SCRIPT_DIR/ansible/install.sh"
# Runs last: needs rootless Docker already up (started at boot) so it can
# delegate cgroups to it. No-ops where that does not apply.
"$SCRIPT_DIR/docker-rootless-cgroup/install.sh"