Skip to content

Commit

Permalink
Use cgroupfs as cgroup driver
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed Jul 4, 2021
1 parent 20b35bb commit e4e3c0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/model/components/kubelet.go
Expand Up @@ -221,9 +221,9 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
}

// Set systemd as the default cgroup driver for kubelet from k8s 1.20
if b.IsKubernetesGTE("1.20") && clusterSpec.Kubelet.CgroupDriver == "" {
clusterSpec.Kubelet.CgroupDriver = "systemd"
}
//if b.IsKubernetesGTE("1.20") && clusterSpec.Kubelet.CgroupDriver == "" {
// clusterSpec.Kubelet.CgroupDriver = "systemd"
//}

return nil
}
2 changes: 1 addition & 1 deletion upup/pkg/fi/cloudup/apply_cluster.go
Expand Up @@ -1435,7 +1435,7 @@ func buildContainerdConfig(cluster *kops.Cluster) string {
}
config.SetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "containerd", "runtimes", "runc", "runtime_type"}, "io.containerd.runc.v2")
// only enable systemd cgroups for kubernetes >= 1.20
config.SetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "containerd", "runtimes", "runc", "options", "SystemdCgroup"}, cluster.IsKubernetesGTE("1.20"))
//config.SetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "containerd", "runtimes", "runc", "options", "SystemdCgroup"}, cluster.IsKubernetesGTE("1.20"))
if components.UsesKubenet(cluster.Spec.Networking) {
// Using containerd with Kubenet requires special configuration.
// This is a temporary backwards-compatible solution for kubenet users and will be deprecated when Kubenet is deprecated:
Expand Down

0 comments on commit e4e3c0f

Please sign in to comment.