Skip to content

Commit 0957852

Browse files
authored
Merge pull request #5226 from nojnhuh/ctrd-device-plugin
simplify DRA config for containerd
2 parents fd746e8 + 9e0c419 commit 0957852

File tree

4 files changed

+36
-47
lines changed

4 files changed

+36
-47
lines changed

templates/test/ci/cluster-template-prow-ci-version-dra.yaml

Lines changed: 12 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/ci/patches/dra-kubeadmconfig.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
path: /spec/files/-
33
value:
44
content: |
5-
#!/bin/bash
6-
7-
echo "enabling containerd CDI plugin"
8-
sed -i '/\[plugins."io.containerd.grpc.v1.cri"\]/a\ enable_cdi = true' /etc/containerd/config.toml
9-
systemctl restart containerd
5+
version = 2
6+
[plugins]
7+
[plugins."io.containerd.grpc.v1.cri"]
8+
enable_cdi = true
109
owner: root:root
11-
path: /tmp/containerd-config.sh
12-
permissions: "0744"
10+
path: /etc/containerd/conf.d/device-plugin.toml
11+
permissions: "0644"
1312
- op: add
1413
path: /spec/preKubeadmCommands/0
1514
value: bash -c /tmp/containerd-config.sh

templates/test/ci/patches/dra-kubeadmcontrolplane.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22
path: /spec/kubeadmConfigSpec/files/-
33
value:
44
content: |
5-
#!/bin/bash
6-
7-
echo "enabling containerd CDI plugin"
8-
sed -i '/\[plugins."io.containerd.grpc.v1.cri"\]/a\ enable_cdi = true' /etc/containerd/config.toml
9-
systemctl restart containerd
5+
version = 2
6+
[plugins]
7+
[plugins."io.containerd.grpc.v1.cri"]
8+
enable_cdi = true
109
owner: root:root
11-
path: /tmp/containerd-config.sh
12-
permissions: "0744"
13-
- op: add
14-
path: /spec/kubeadmConfigSpec/preKubeadmCommands/0
15-
value: bash -c /tmp/containerd-config.sh
10+
path: /etc/containerd/conf.d/device-plugin.toml
11+
permissions: "0644"
1612
- op: add
1713
path: /spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/feature-gates
1814
value: ${K8S_FEATURE_GATES:-"DynamicResourceAllocation=true"}

templates/test/dev/cluster-template-custom-builds-dra.yaml

Lines changed: 12 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)