diff --git a/hack/install-deps.sh b/hack/install-deps.sh index c3032717c..676c0daee 100755 --- a/hack/install-deps.sh +++ b/hack/install-deps.sh @@ -44,6 +44,12 @@ if ${NOSUDO}; then sudo="" 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 RUNC_DIR=${DESTDIR} CNI_DIR=${DESTDIR}/opt/cni @@ -88,37 +94,39 @@ make BUILDTAGS="$BUILDTAGS" ${sudo} make install -e DESTDIR=${RUNC_DIR} # Install cni -checkout_repo ${CNI_PKG} ${CNI_VERSION} -cd ${GOPATH}/src/${CNI_PKG} -./build.sh -${sudo} mkdir -p ${CNI_DIR} -${sudo} cp -r ./bin ${CNI_DIR} -${sudo} mkdir -p ${CNI_CONFIG_DIR} -${sudo} bash -c 'cat >'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <