Skip to content

Commit 63f6dd7

Browse files
milantracygvisor-bot
authored andcommitted
Install CNI plugins from the containerd repo.
Remove the legacy settings, the minimum supported CNI version is 0.4.0. PiperOrigin-RevId: 736255397
1 parent c68fb31 commit 63f6dd7

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

tools/install_containerd.sh

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -128,31 +128,10 @@ log_level = "debug"
128128
file-access = "shared"
129129
EOF
130130

131-
# Configure CNI.
132-
(cd "${GOPATH}" && src/github.com/containerd/containerd/script/setup/install-cni)
133-
tee /etc/cni/net.d/10-bridge.conf <<EOF
134-
{
135-
"cniVersion": "0.3.1",
136-
"name": "bridge",
137-
"type": "bridge",
138-
"bridge": "cnio0",
139-
"isGateway": true,
140-
"ipMasq": true,
141-
"ipam": {
142-
"type": "host-local",
143-
"ranges": [
144-
[{"subnet": "10.200.0.0/24"}]
145-
],
146-
"routes": [{"dst": "0.0.0.0/0"}]
147-
}
148-
}
149-
EOF
150-
tee /etc/cni/net.d/99-loopback.conf <<EOF
151-
{
152-
"cniVersion": "0.3.1",
153-
"type": "loopback"
154-
}
155-
EOF
131+
# Configure CNI, the script install-cni depends on go.mod to determine the
132+
# version of github.com/containernetworking/plugins, it has to be installed
133+
# from containerd's root directory.
134+
(cd "${GOPATH}"/src/github.com/containerd/containerd/ && ./script/setup/install-cni)
156135

157136
# Configure crictl.
158137
tee /etc/crictl.yaml <<EOF

0 commit comments

Comments
 (0)