Skip to content

Commit 8d1cbfc

Browse files
authored
fix: use cli credentials for azcopy when downloading from private urls (#7498)
1 parent 98f601d commit 8d1cbfc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

vhdbuilder/packer/install-dependencies.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ if [ -d "/var/log/azure/Microsoft.Azure.Extensions.CustomScript/events/" ] && [
723723
fi
724724
capture_benchmark "${SCRIPT_NAME}_configure_telemetry"
725725

726-
# download kubernetes package from the given URL using MSI for auth for azcopy
726+
# download kubernetes package from the given URL using azcopy
727727
# if it is a kube-proxy package, extract image from the downloaded package
728728
cacheKubePackageFromPrivateUrl() {
729729
local kube_private_binary_url="$1"
@@ -736,14 +736,15 @@ cacheKubePackageFromPrivateUrl() {
736736
local k8s_tgz_name
737737
k8s_tgz_name=$(echo "$kube_private_binary_url" | grep -o -P '(?<=\/kubernetes\/).*(?=\/binaries\/)').tar.gz
738738

739-
# use azcopy with MSI instead of curl to download packages
739+
# use azcopy instead of curl to download packages
740740
getAzCopyCurrentPath
741-
export AZCOPY_LOG_LOCATION="$(pwd)/azcopy-log-files/"
742-
export AZCOPY_JOB_PLAN_LOCATION="$(pwd)/azcopy-job-plan-files/"
743-
mkdir -p "${AZCOPY_LOG_LOCATION}"
744-
mkdir -p "${AZCOPY_JOB_PLAN_LOCATION}"
745741

746-
./azcopy login --login-type=MSI
742+
export AZCOPY_AUTO_LOGIN_TYPE="AZCLI"
743+
export AZCOPY_CONCURRENCY_VALUE="AUTO"
744+
export AZCOPY_LOG_LOCATION="$(pwd)/azcopy-log-files/"
745+
export AZCOPY_JOB_PLAN_LOCATION="$(pwd)/azcopy-job-plan-files/"
746+
mkdir -p "${AZCOPY_LOG_LOCATION}"
747+
mkdir -p "${AZCOPY_JOB_PLAN_LOCATION}"
747748

748749
cached_pkg="${K8S_PRIVATE_PACKAGES_CACHE_DIR}/${k8s_tgz_name}"
749750
echo "download private package ${kube_private_binary_url} and store as ${cached_pkg}"

0 commit comments

Comments
 (0)