From 50234ecc0f8dd6e45a9792f21123794886d63e4b Mon Sep 17 00:00:00 2001 From: Trevor Pering Date: Mon, 23 Oct 2023 11:02:04 -0700 Subject: [PATCH] Check already-set quota project --- udmis/bin/setup | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/udmis/bin/setup b/udmis/bin/setup index 83e6afa8a5..54a83fa37c 100755 --- a/udmis/bin/setup +++ b/udmis/bin/setup @@ -18,8 +18,10 @@ ROOT=$(dirname $0)/.. cd $ROOT echo Configuring for GCP project $project_id... -# This is slow, and not sure it's necessary... -# gcloud auth application-default set-quota-project $project_id +quota_project=$(jq -r .quota_project_id $HOME/.config/gcloud/application_default_credentials.json) +if [[ $quota_project != $project_id ]]; then + gcloud auth application-default set-quota-project $project_id +fi gcloud --quiet config set project $project_id saved=$(kubectl config current-context)