Skip to content

Commit

Permalink
Merge pull request #917 from z63d/feat/systemd-cgroup-support
Browse files Browse the repository at this point in the history
Add systemd cgroup support for k3s and k8s
  • Loading branch information
jprendes authored Mar 8, 2025
2 parents 07ea10e + 3eba374 commit 949fd29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions test/k3s/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ cp -f /var/lib/rancher/k3s/agent/etc/containerd/config.toml /var/lib/rancher/k3s
cat <<EOF >> /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
[plugins."io.containerd.cri.v1.runtime".containerd.runtimes.wasm]
runtime_type = "$PWD/dist/bin/containerd-shim-$1-v1"
[plugins."io.containerd.cri.v1.runtime".containerd.runtimes.wasm.options]
SystemdCgroup = true
EOF

cat <<EOF > /etc/systemd/system/k3s-runwasi.service.env
Expand Down
8 changes: 5 additions & 3 deletions test/k8s/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ ADD --chmod=755 https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-${TARGETA

FROM kindest/node:${KIND_NODE_VERSION}
RUN apt-get update -y && \
apt-get install --no-install-recommends -y libdbus-1-3
apt-get install --no-install-recommends -y dbus

ADD dist/bin/* /usr/local/bin/

ARG RUNTIME
RUN cat <<EOF >> /etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.wasm]
runtime_type = "io.containerd.${RUNTIME}.v1"
EOF
runtime_type = "io.containerd.${RUNTIME}.v1"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.wasm.options]
SystemdCgroup = true
EOF

0 comments on commit 949fd29

Please sign in to comment.