Add a new utility file - util/cgroupdriver.go. Currently it only contains the public function GetCgroupDriverDocker(). The function uses 'docker info' to obtain the cgroup driver for Docker. On a later stage this file can contain more methods for different CRI. Use GetCgroupDriverDocker() in phases/kubelet/flags.go to conditionally set the 'cgroup-driver' argument. On error print a warning and don't set the argument value. Add unit tests in cgroupdriver_test.go.
1.8 KiB
1.8 KiB