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

Commit

Permalink
fix: containerd downloads every time
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Feb 7, 2019
1 parent 9f87387 commit aaed4f5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions parts/k8s/kubernetesinstalls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,16 @@ installAzureCNI() {
}

installContainerd() {
if [[ ! -f "$CONTAINERD_DOWNLOADS_DIR/${CONTAINERD_TGZ_TMP}" ]]; then
containerd --version
if [ $? -eq 0 ]; then
echo "containerd is already installed, skipping download"
else
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

0 comments on commit aaed4f5

Please sign in to comment.