Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: remove register_feature and aks-preview #948

Merged
merged 2 commits into from
May 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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