Skip to content

Commit b88bf1e

Browse files
authored
Merge pull request #5755 from adisky/gce-configure-use-systemd
Use systemd cgroup driver for Kubernetes e2e tests with cgroupsv2
2 parents 29b86c5 + 150e07b commit b88bf1e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

contrib/gce/configure.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ if [ "${KUBERNETES_MASTER:-}" != "true" ]; then
176176
cni_template_path=""
177177
fi
178178
fi
179+
# Use systemd cgroup if cgroupv2 is enabled
180+
systemdCgroup="${CONTAINERD_CGROUPV2:-"false"}"
179181
log_level="${CONTAINERD_LOG_LEVEL:-"info"}"
180182
max_container_log_line="${CONTAINERD_MAX_CONTAINER_LOG_LINE:-16384}"
181183
cat > ${config_path} <<EOF
@@ -204,6 +206,7 @@ disabled_plugins = ["io.containerd.internal.v1.restart"]
204206
runtime_type = "io.containerd.runc.v2"
205207
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
206208
BinaryName = "${CONTAINERD_HOME}/usr/local/sbin/runc"
209+
SystemdCgroup = ${systemdCgroup}
207210
EOF
208211
chmod 644 "${config_path}"
209212

0 commit comments

Comments
 (0)