Skip to content

Commit 8f27a37

Browse files
authored
Merge pull request #5698 from nojnhuh/e2e-storage-account-name
Use more entropy for random WI storage account names
2 parents a0a7725 + 0e80f51 commit 8f27a37

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ LDFLAGS := $(shell hack/version.sh)
200200
CLUSTER_TEMPLATE ?= cluster-template.yaml
201201

202202
export KIND_CLUSTER_NAME ?= capz
203-
export RANDOM_SUFFIX := $(shell /bin/bash -c "echo $$RANDOM")
203+
export RANDOM_SUFFIX := $(shell od -An -N8 -tx8 /dev/urandom | tr -d ' ' | head -c 16)
204204
export AZWI_RESOURCE_GROUP ?= capz-wi-$(RANDOM_SUFFIX)
205205
export CI_RG ?= $(AZWI_RESOURCE_GROUP)
206206
export USER_IDENTITY ?= $(addsuffix $(RANDOM_SUFFIX),$(CI_RG))

scripts/kind-with-registry.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ if [ -f "$TILT_SETTINGS_FILE" ]; then
4545
fi
4646

4747
AZWI_ENABLED="${AZWI_ENABLED:-true}"
48-
RANDOM_SUFFIX="${RANDOM_SUFFIX:-$(od -An -N4 -tu4 /dev/urandom | tr -d ' ' | head -c 8)}"
49-
export AZWI_STORAGE_ACCOUNT="capzcioidcissuer${RANDOM_SUFFIX}"
48+
RANDOM_SUFFIX="${RANDOM_SUFFIX:-$(od -An -N8 -tx8 /dev/urandom | tr -d ' ' | head -c 16)}"
49+
export AZWI_STORAGE_ACCOUNT="capzoidc${RANDOM_SUFFIX}"
5050
export AZWI_STORAGE_CONTAINER="\$web"
5151
export AZWI_LOCATION="${AZURE_LOCATION:-southcentralus}"
5252
export SERVICE_ACCOUNT_ISSUER="${SERVICE_ACCOUNT_ISSUER:-}"

0 commit comments

Comments
 (0)