windows-testing
windows-testing copied to clipboard
Use managed identity for the clusters and remove az capi
The removes the need for Service Principals in the cluster creation process. It uses managed identities on the management cluster and workload clusters instead.
When running locally you can log into the azure CLI via interactive prompt which means the there are no Service Principals needed to run the e2e tests. A service principal is still used for the Azure CLI in CI since this script runs in the PROW instance and doesn't have access to the Azure Managed Identity infrastructure.
This removes the dependency on az capi extension due to https://github.com/Azure/azure-capi-cli-extension/issues/263. This brough the required steps into the scripts here which will make it easier to maintain and debug.
It does assume a cloud-provider-identity pre-created with
az identity create -n "cloud-provider-user-identity" -g "capz-ci" -l westus2
az role assignment create --assignee-object-id "<objectid>" --role "Contributor" --scope "/subscriptions/<subid" --assignee-principal-type ServicePrincipal --output none --only-show-errors
/cc @marosset