From 8f0cb3af1f57391fb43da12d4e113b224fa40f3a Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Tue, 16 Feb 2021 13:44:24 +0100 Subject: [PATCH] Actually enable systemd cgroup for containerd --- pkg/model/components/containerd.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/model/components/containerd.go b/pkg/model/components/containerd.go index a4f2e684d9..b6c2e3a031 100644 --- a/pkg/model/components/containerd.go +++ b/pkg/model/components/containerd.go @@ -62,6 +62,8 @@ func (b *ContainerdOptionsBuilder) BuildOptions(o interface{}) error { config.SetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "registry", "mirrors", name, "endpoint"}, endpoints) } 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"}, b.IsKubernetesGTE("1.20")) if UsesKubenet(clusterSpec.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: