Do not include CNI binaries/configs in release tarball.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
529971a1dd
commit
d1f0ac92c5
@ -44,6 +44,12 @@ if ${NOSUDO}; then
|
|||||||
sudo=""
|
sudo=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# INSTALL_CNI indicates whether to install CNI. CNI installation
|
||||||
|
# makes sense for local testing, but doesn't make sense for cluster
|
||||||
|
# setup, because CNI daemonset is usually used to deploy CNI binaries
|
||||||
|
# and configurations in cluster.
|
||||||
|
INSTALL_CNI=${INSTALL_CNI:-true}
|
||||||
|
|
||||||
CONTAINERD_DIR=${DESTDIR}/usr/local
|
CONTAINERD_DIR=${DESTDIR}/usr/local
|
||||||
RUNC_DIR=${DESTDIR}
|
RUNC_DIR=${DESTDIR}
|
||||||
CNI_DIR=${DESTDIR}/opt/cni
|
CNI_DIR=${DESTDIR}/opt/cni
|
||||||
@ -88,13 +94,14 @@ make BUILDTAGS="$BUILDTAGS"
|
|||||||
${sudo} make install -e DESTDIR=${RUNC_DIR}
|
${sudo} make install -e DESTDIR=${RUNC_DIR}
|
||||||
|
|
||||||
# Install cni
|
# Install cni
|
||||||
checkout_repo ${CNI_PKG} ${CNI_VERSION}
|
if ${INSTALL_CNI}; then
|
||||||
cd ${GOPATH}/src/${CNI_PKG}
|
checkout_repo ${CNI_PKG} ${CNI_VERSION}
|
||||||
./build.sh
|
cd ${GOPATH}/src/${CNI_PKG}
|
||||||
${sudo} mkdir -p ${CNI_DIR}
|
./build.sh
|
||||||
${sudo} cp -r ./bin ${CNI_DIR}
|
${sudo} mkdir -p ${CNI_DIR}
|
||||||
${sudo} mkdir -p ${CNI_CONFIG_DIR}
|
${sudo} cp -r ./bin ${CNI_DIR}
|
||||||
${sudo} bash -c 'cat >'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <<EOF
|
${sudo} mkdir -p ${CNI_CONFIG_DIR}
|
||||||
|
${sudo} bash -c 'cat >'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <<EOF
|
||||||
{
|
{
|
||||||
"cniVersion": "0.3.1",
|
"cniVersion": "0.3.1",
|
||||||
"name": "containerd-net",
|
"name": "containerd-net",
|
||||||
@ -119,6 +126,7 @@ ${sudo} bash -c 'cat >'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <<EOF
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
EOF'
|
EOF'
|
||||||
|
fi
|
||||||
|
|
||||||
# Install containerd
|
# Install containerd
|
||||||
checkout_repo ${CONTAINERD_PKG} ${CONTAINERD_VERSION}
|
checkout_repo ${CONTAINERD_PKG} ${CONTAINERD_VERSION}
|
||||||
|
@ -29,7 +29,7 @@ TARBALL=${TARBALL:-"cri-containerd.tar.gz"}
|
|||||||
destdir=${BUILD_DIR}/release-stage
|
destdir=${BUILD_DIR}/release-stage
|
||||||
|
|
||||||
# Install dependencies into release stage.
|
# Install dependencies into release stage.
|
||||||
NOSUDO=true DESTDIR=${destdir} ./hack/install-deps.sh
|
NOSUDO=true INSTALL_CNI=false DESTDIR=${destdir} ./hack/install-deps.sh
|
||||||
|
|
||||||
# Install cri-containerd into release stage.
|
# Install cri-containerd into release stage.
|
||||||
make install -e DESTDIR=${destdir}
|
make install -e DESTDIR=${destdir}
|
||||||
|
Loading…
Reference in New Issue
Block a user