Skip to content

Commit 008de7b

Browse files
authored
Merge pull request #1930 from aramase/automated-cherry-pick-of-#1929-upstream-release-1.5
ci: resolve azure e2e test flakes with rbac, windows vm size
2 parents c22f7bb + 96dbbdc commit 008de7b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/scripts/run-e2e-azure.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,14 @@ main() {
7777
# only add windows pool if TEST_WINDOWS is set and equal to true
7878
if [[ "${TEST_WINDOWS:-}" == "true" ]]; then
7979
echo "Adding windows nodepool"
80-
# add windows nodepool
80+
# add windows nodepool with explicit x64 VM size (Windows doesn't support ARM64)
8181
az aks nodepool add \
8282
--resource-group "${CLUSTER_NAME}" \
8383
--cluster-name "${CLUSTER_NAME}" \
8484
--os-type Windows \
8585
--name npwin \
86-
--node-count 1 > /dev/null
86+
--node-count 1 \
87+
--node-vm-size Standard_D2s_v3 > /dev/null
8788
fi
8889

8990
az aks get-credentials --resource-group "${CLUSTER_NAME}" --name "${CLUSTER_NAME}" --overwrite-existing
@@ -133,9 +134,12 @@ main() {
133134
# Assigning the managed identity the necessary permissions to access the keyvault using RBAC
134135
echo "Assigning managed identity Key Vault Secrets User role on keyvault"
135136
KEYVAULT_RESOURCE_ID=$(az keyvault show --name "${KEYVAULT_NAME}" --query "id" -otsv)
137+
# Use --assignee-principal-type to avoid replication delay issues
138+
# See: https://learn.microsoft.com/en-us/azure/role-based-access-control/troubleshooting#symptom---assigning-a-role-to-a-new-principal-sometimes-fails
136139
az role assignment create \
137140
--role "Key Vault Secrets User" \
138-
--assignee "${IDENTITY_OBJECT_ID}" \
141+
--assignee-object-id "${IDENTITY_OBJECT_ID}" \
142+
--assignee-principal-type ServicePrincipal \
139143
--scope "${KEYVAULT_RESOURCE_ID}" > /dev/null
140144

141145
docker pull "${IMAGE_TAG}" || ALL_ARCH_linux=amd64 make container-all push-manifest

0 commit comments

Comments
 (0)