Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

fix: do not re-download containerd if pre-downloaded in VHD #457

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion packer/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ for CNI_PLUGIN_VERSION in $CNI_PLUGIN_VERSIONS; do
downloadCNI
done

installContainerd
CRI_CONTAINERD_VERSIONS="1.1.5"
for CRI_CONTAINERD_VERSION in $CRI_CONTAINERD_VERSIONS; do
CONTAINERD_DOWNLOAD_URL="${CONTAINERD_DOWNLOAD_URL_BASE}cri-containerd-${CRI_CONTAINERD_VERSION}.linux-amd64.tar.gz"
downloadContainerd
done

installImg

Expand Down
13 changes: 5 additions & 8 deletions parts/k8s/kubernetesinstalls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,13 @@ installAzureCNI() {
}

installContainerd() {
containerd --version
if [ $? -eq 0 ]; then
echo "containerd is already installed, skipping download"
else
if [[ ! -f "$CONTAINERD_DOWNLOADS_DIR/${CONTAINERD_TGZ_TMP}" ]]; then
downloadContainerd
tar -xzf "$CONTAINERD_DOWNLOADS_DIR/$CONTAINERD_TGZ_TMP" -C /
rm -Rf $CONTAINERD_DOWNLOADS_DIR &
sed -i '/\[Service\]/a ExecStartPost=\/sbin\/iptables -P FORWARD ACCEPT' /etc/systemd/system/containerd.service
echo "Successfully installed cri-containerd..."
fi
tar -xzf "$CONTAINERD_DOWNLOADS_DIR/$CONTAINERD_TGZ_TMP" -C /
rm -Rf $CONTAINERD_DOWNLOADS_DIR &
sed -i '/\[Service\]/a ExecStartPost=\/sbin\/iptables -P FORWARD ACCEPT' /etc/systemd/system/containerd.service
echo "Successfully installed cri-containerd..."
}

installImg() {
Expand Down