From de9c64b5a1b35ab709e83049ee4f0736f912e8af Mon Sep 17 00:00:00 2001 From: Jack Francis Date: Thu, 6 Jun 2024 10:35:30 -0700 Subject: [PATCH] review feedback Signed-off-by: Jack Francis --- Makefile | 1 - hack/log/redact.sh | 2 ++ scripts/kind-with-registry.sh | 5 +---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0262c8ec4cf..da7865b9819 100644 --- a/Makefile +++ b/Makefile @@ -200,7 +200,6 @@ export RANDOM_SUFFIX := $(shell /bin/bash -c "echo $$RANDOM") export AZWI_RESOURCE_GROUP ?= capz-wi-$(RANDOM_SUFFIX) export CI_RG ?= $(AZWI_RESOURCE_GROUP) export USER_IDENTITY ?= $(addsuffix $(RANDOM_SUFFIX),$(CI_RG)) -export AZWI_LOCATION ?= eastus export AZURE_IDENTITY_ID_FILEPATH ?= $(ROOT_DIR)/azure_identity_id ## -------------------------------------- diff --git a/hack/log/redact.sh b/hack/log/redact.sh index 7ef522a7aee..4fb2ec4c389 100755 --- a/hack/log/redact.sh +++ b/hack/log/redact.sh @@ -28,10 +28,12 @@ redact_vars=( "${AZURE_SUBSCRIPTION_ID:-}" "${AZURE_TENANT_ID:-}" "${AZURE_JSON_B64:-}" + "${AZURE_CLIENT_ID_USER_ASSIGNED_IDENTITY:-}" "$(echo -n "${AZURE_SUBSCRIPTION_ID:-}" | base64 | tr -d '\n')" "$(echo -n "${AZURE_TENANT_ID:-}" | base64 | tr -d '\n')" "$(echo -n "${AZURE_CLIENT_ID:-}" | base64 | tr -d '\n')" "$(echo -n "${AZURE_CLIENT_SECRET:-}" | base64 | tr -d '\n')" + "$(echo -n "${AZURE_CLIENT_ID_USER_ASSIGNED_IDENTITY:-}" | base64 | tr -d '\n')" ) for log_file in "${log_files[@]}"; do diff --git a/scripts/kind-with-registry.sh b/scripts/kind-with-registry.sh index 9373227ab5f..a9ecfaf936e 100755 --- a/scripts/kind-with-registry.sh +++ b/scripts/kind-with-registry.sh @@ -31,6 +31,7 @@ AZWI_ENABLED="${AZWI_ENABLED:-true}" RANDOM_SUFFIX="${RANDOM_SUFFIX:-$RANDOM}" export AZWI_STORAGE_ACCOUNT="oidcissuer${RANDOM_SUFFIX}" export AZWI_STORAGE_CONTAINER="\$web" +export AZWI_LOCATION="${AZURE_LOCATION:-southcentralus}" export SERVICE_ACCOUNT_ISSUER="${SERVICE_ACCOUNT_ISSUER:-}" export SERVICE_ACCOUNT_SIGNING_PUB_FILEPATH="${SERVICE_ACCOUNT_SIGNING_PUB_FILEPATH:-}" export SERVICE_ACCOUNT_SIGNING_KEY_FILEPATH="${SERVICE_ACCOUNT_SIGNING_KEY_FILEPATH:-}" @@ -92,10 +93,6 @@ function checkAZWIENVPreReqsAndCreateFiles() { echo "AZWI_RESOURCE_GROUP environment variable required - Azure resource group to store required Workload Identity artifacts" exit 1 fi - if [ -z "${AZWI_LOCATION}" ]; then - echo "AZWI_LOCATION environment variable required - Azure location where required Workload Identity artifacts reside" - exit 1 - fi if [ "$(az group exists --name "${AZWI_RESOURCE_GROUP}" --output tsv)" == 'false' ]; then echo "Creating resource group '${AZWI_RESOURCE_GROUP}' in '${AZWI_LOCATION}'" az group create --name "${AZWI_RESOURCE_GROUP}" --location "${AZWI_LOCATION}" --output none --only-show-errors --tags creationTimestamp="${TIMESTAMP}" jobName="${JOB_NAME}" buildProvenance="${BUILD_PROVENANCE}"