Skip to content

Commit

Permalink
cleanup: use url from manifest.cue to download k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
timmy-wright committed May 29, 2024
1 parent 8b38584 commit 8378680
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vhdbuilder/packer/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,14 @@ fi
# Please do not use the .1 suffix, because that's only for the base image patches
# regular version >= v1.17.0 or hotfixes >= 20211009 has arm64 binaries.
KUBE_BINARY_VERSIONS="$(jq -r .kubernetes.versions[] manifest.json)"
KUBE_URL="$(jq -r .kubernetes.downloadURL manifest.json)"

for PATCHED_KUBE_BINARY_VERSION in ${KUBE_BINARY_VERSIONS}; do
KUBERNETES_VERSION=$(echo ${PATCHED_KUBE_BINARY_VERSION} | cut -d"_" -f1 | cut -d"-" -f1 | cut -d"." -f1,2,3)
extractKubeBinaries $KUBERNETES_VERSION "https://acs-mirror.azureedge.net/kubernetes/v${PATCHED_KUBE_BINARY_VERSION}/binaries/kubernetes-node-linux-${CPU_ARCH}.tar.gz" false

KUBE_VERSION_URL=$(echo $KUBE_URL | PATCHED_KUBE_BINARY_VERSION=${PATCHED_KUBE_BINARY_VERSION} CPU_ARCH=${CPU_ARCH} envsubst)

extractKubeBinaries $KUBERNETES_VERSION "${KUBE_VERSION_URL}" false
done

rm -f ./azcopy # cleanup immediately after usage will return in two downloads
Expand Down

0 comments on commit 8378680

Please sign in to comment.