-
Notifications
You must be signed in to change notification settings - Fork 196
/
preprovision.ps1
34 lines (27 loc) · 1.67 KB
/
preprovision.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env pwsh
Write-Host "Ensuring Azure CLI extensions and dependencies are installed"
az provider register --namespace "Microsoft.ContainerService"
while ((az provider show --namespace "Microsoft.ContainerService" --query "registrationState" -o tsv) -ne "Registered") {
Write-Host "Waiting for Microsoft.ContainerService provider registration..."
Start-Sleep -Seconds 3
}
az feature register --namespace "Microsoft.ContainerService" --name "NetworkObservabilityPreview"
while ((az feature show --namespace "Microsoft.ContainerService" --name "NetworkObservabilityPreview" --query "properties.state" -o tsv) -ne "Registered") {
Write-Host "Waiting for NetworkObservabilityPreview feature registration..."
Start-Sleep -Seconds 3
}
az feature register --namespace "Microsoft.ContainerService" --name "NodeOsUpgradeChannelPreview"
while ((az feature show --namespace "Microsoft.ContainerService" --name "NodeOsUpgradeChannelPreview" --query "properties.state" -o tsv) -ne "Registered") {
Write-Host "Waiting for NodeOsUpgradeChannelPreview feature registration..."
Start-Sleep -Seconds 3
}
az feature register --namespace "Microsoft.ContainerService" --name "AzureMonitorMetricsControlPlanePreview"
while ((az feature show --namespace "Microsoft.ContainerService" --name "AzureMonitorMetricsControlPlanePreview" --query "properties.state" -o tsv) -ne "Registered") {
Write-Host "Waiting for AzureMonitorMetricsControlPlanePreview feature registration..."
Start-Sleep -Seconds 3
}
# propagate the feature registrations
az provider register -n Microsoft.ContainerService
# add azure cli extensions
az extension add --upgrade --name aks-preview
az extension add --upgrade --name amg