disable tracing while handling token

Signed-off-by: Akhil Mohan <makhil@vmware.com>
This commit is contained in:
Akhil Mohan 2022-12-08 12:01:05 +05:30
parent 9df96dc46a
commit b94c1018af
No known key found for this signature in database
GPG Key ID: 0AC831D47BAE6F8A

View File

@ -104,6 +104,7 @@ if [ -f "${CONTAINERD_HOME}/${CONTAINERD_ENV_METADATA}" ]; then
source "${CONTAINERD_HOME}/${CONTAINERD_ENV_METADATA}"
fi
set +x
# GCS_BUCKET_TOKEN_METADATA is the metadata key for the GCS bucket token
GCS_BUCKET_TOKEN_METADATA="GCS_BUCKET_TOKEN"
# GCS_BUCKET_TOKEN should have read access to the bucket from which
@ -112,6 +113,7 @@ GCS_BUCKET_TOKEN=$(fetch_metadata "${GCS_BUCKET_TOKEN_METADATA}")
if [[ -n "${GCS_BUCKET_TOKEN}" ]]; then
HEADERS=(-H "Authorization: Bearer ${GCS_BUCKET_TOKEN}")
fi
set -x
# CONTAINERD_PKG_PREFIX is the prefix of the cri-containerd tarball name.
# By default use the release tarball with cni built in.
@ -142,7 +144,7 @@ else
| jq -r .tag_name \
| sed "s:v::g")
else
version=$(curl -X GET "${HEADERS[@]}" -f --ipv4 --retry 6 --retry-delay 3 --silent --show-error \
version=$(set +x; curl -X GET "${HEADERS[@]}" -f --ipv4 --retry 6 --retry-delay 3 --silent --show-error \
https://storage.googleapis.com/${deploy_path}/latest)
fi
fi
@ -174,7 +176,8 @@ else
echo "${TARBALL_GCS_NAME} is preloaded"
else
# Download and untar the release tar ball.
curl -X GET "${HEADERS[@]}" -f --ipv4 -Lo "${TARBALL}" --connect-timeout 20 --max-time 300 --retry 6 --retry-delay 10 "${TARBALL_GCS_PATH}"
$(set +x; curl -X GET "${HEADERS[@]}" -f --ipv4 -Lo "${TARBALL}" --connect-timeout 20 --max-time 300 --retry 6 \
--retry-delay 10 "${TARBALL_GCS_PATH}")
tar xvf "${TARBALL}"
rm -f "${TARBALL}"
fi