Skip to content

Commit

Permalink
ci: remove register_feature and aks-preview (#948)
Browse files Browse the repository at this point in the history
Signed-off-by: Anish Ramasekar <[email protected]>
  • Loading branch information
aramase committed May 17, 2023
1 parent 5abaeea commit a5f2ee3
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions scripts/create-aks-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,8 @@ should_create_aks_cluster() {
echo "true" && return
}

register_feature() {
# pinning to 0.5.87 because of https://github.com/Azure/azure-cli/issues/23267
az extension add --name aks-preview --version 0.5.87
# register enable oidc preview feature
az feature register --namespace Microsoft.ContainerService --name EnableOIDCIssuerPreview > /dev/null
# https://docs.microsoft.com/en-us/azure/aks/windows-container-cli#add-a-windows-server-node-pool-with-containerd-preview
az feature register --namespace Microsoft.ContainerService --name UseCustomizedWindowsContainerRuntime > /dev/null
while [[ "$(az feature list --query "[?contains(name, 'Microsoft.ContainerService/EnableOIDCIssuerPreview')].{Name:name,State:properties.state}" | jq -r '.[].State')" != "Registered" ]] &&
[[ "$(az feature list --query "[?contains(name, 'Microsoft.ContainerService/UseCustomizedWindowsContainerRuntime')].{Name:name,State:properties.state}" | jq -r '.[].State')" != "Registered" ]]; do
sleep 20
done
az provider register --namespace Microsoft.ContainerService
}

main() {
if [[ "$(should_create_aks_cluster)" == "true" ]]; then
export -f register_feature
# might take around 20 minutes to register
timeout --foreground 1200 bash -c register_feature
echo "Creating an AKS cluster '${CLUSTER_NAME}'"
LOCATION="$(get_random_region)"
# get the latest patch version of 1.24
Expand Down

0 comments on commit a5f2ee3

Please sign in to comment.