Fix an issue in which, when trying to specify the `--kube-reserved-cgroup` (or `--system-reserved-cgroup`) with `--cgroup-driver=systemd`, we will not properly convert the `systemd` cgroup name into the internal cgroup name that k8s expects. Without this change, specifying `--kube-reserved-cgroup=/test.slice --cgroup-driver=systemd` will fail, and only `--kube-reserved-cgroup=/test --crgroup-driver=systemd` will succeed, even if the actual cgroup existing on the host is `/test.slice`. Additionally, add light unit testing of our process from converting to a systemd cgroup name to kubernetes internal cgroup name.
4.5 KiB
4.5 KiB