• Lubomir I. Ivanov's avatar
    kubeadm: conditionally set the kubelet cgroup driver for Docker · 2a63ba1d
    Lubomir I. Ivanov authored
    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.
    2a63ba1d
cgroupdriver_test.go 1.76 KB