Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 72ade6c

Browse files
committed
Remove 10-containerd-net.conflist from cri-containerd-cni release tarball.
Signed-off-by: Lantao Liu <[email protected]>
1 parent b2ebb73 commit 72ade6c

File tree

5 files changed

+60
-30
lines changed

5 files changed

+60
-30
lines changed

hack/install/install-cni-config.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
# Copyright 2018 The containerd Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -o errexit
18+
set -o nounset
19+
set -o pipefail
20+
21+
source $(dirname "${BASH_SOURCE[0]}")/utils.sh
22+
CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d
23+
${SUDO} mkdir -p ${CNI_CONFIG_DIR}
24+
${SUDO} bash -c 'cat >'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <<EOF
25+
{
26+
"cniVersion": "0.3.1",
27+
"name": "containerd-net",
28+
"plugins": [
29+
{
30+
"type": "bridge",
31+
"bridge": "cni0",
32+
"isGateway": true,
33+
"ipMasq": true,
34+
"promiscMode": true,
35+
"ipam": {
36+
"type": "host-local",
37+
"subnet": "10.88.0.0/16",
38+
"routes": [
39+
{ "dst": "0.0.0.0/0" }
40+
]
41+
}
42+
},
43+
{
44+
"type": "portmap",
45+
"capabilities": {"portMappings": true}
46+
}
47+
]
48+
}
49+
EOF'

hack/install/install-cni.sh

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ set -o pipefail
2020

2121
source $(dirname "${BASH_SOURCE[0]}")/utils.sh
2222
CNI_DIR=${DESTDIR}/opt/cni
23-
CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d
2423
CNI_PKG=github.com/containernetworking/plugins
2524

2625
# Create a temporary GOPATH for cni installation.
@@ -34,33 +33,6 @@ cd ${GOPATH}/src/${CNI_PKG}
3433
FASTBUILD=true ./build.sh
3534
${SUDO} mkdir -p ${CNI_DIR}
3635
${SUDO} cp -r ./bin ${CNI_DIR}
37-
${SUDO} mkdir -p ${CNI_CONFIG_DIR}
38-
${SUDO} bash -c 'cat >'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <<EOF
39-
{
40-
"cniVersion": "0.3.1",
41-
"name": "containerd-net",
42-
"plugins": [
43-
{
44-
"type": "bridge",
45-
"bridge": "cni0",
46-
"isGateway": true,
47-
"ipMasq": true,
48-
"promiscMode": true,
49-
"ipam": {
50-
"type": "host-local",
51-
"subnet": "10.88.0.0/16",
52-
"routes": [
53-
{ "dst": "0.0.0.0/0" }
54-
]
55-
}
56-
},
57-
{
58-
"type": "portmap",
59-
"capabilities": {"portMappings": true}
60-
}
61-
]
62-
}
63-
EOF'
6436

6537
# Clean the tmp GOPATH dir.
6638
rm -rf ${TMPGOPATH}

hack/install/install-deps.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ cd $(dirname "${BASH_SOURCE[0]}")
3434
# and configurations in cluster.
3535
INSTALL_CNI=${INSTALL_CNI:-true}
3636

37+
# INSTALL_CNI indicates whether to install CNI config.
38+
INSTALL_CNI_CONFIG=${INSTALL_CNI_CONFIG:-true}
39+
3740
# Install runc
3841
./install-runc.sh
3942

@@ -42,6 +45,11 @@ if ${INSTALL_CNI}; then
4245
./install-cni.sh
4346
fi
4447

48+
# Install cni config
49+
if ${INSTALL_CNI_CONFIG}; then
50+
./install-cni-config.sh
51+
fi
52+
4553
# Install containerd
4654
./install-containerd.sh
4755

hack/release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ fi
4343
rm -rf ${destdir}
4444

4545
# Install dependencies into release stage.
46-
NOSUDO=true INSTALL_CNI=${INCLUDE_CNI} DESTDIR=${destdir} ./hack/install/install-deps.sh
46+
NOSUDO=true INSTALL_CNI=${INCLUDE_CNI} INSTALL_CNI_CONFIG=false DESTDIR=${destdir} \
47+
./hack/install/install-deps.sh
4748

4849
if ${CUSTOM_CONTAINERD}; then
4950
make install -e DESTDIR=${destdir}

hack/test-utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test_setup() {
4040
exit 1
4141
fi
4242
sudo pkill -x containerd
43-
keepalive "sudo ${ROOT}/_output/containerd ${CONTAINERD_FLAGS}" \
43+
keepalive "sudo PATH=${PATH} ${ROOT}/_output/containerd ${CONTAINERD_FLAGS}" \
4444
${RESTART_WAIT_PERIOD} &> ${report_dir}/containerd.log &
4545
containerd_pid=$!
4646
# Wait for containerd to be running by using the containerd client ctr to check the version

0 commit comments

Comments
 (0)