Skip to content

Commit 8c9498c

Browse files
committed
Allow create or not ACR when creating k8s
1 parent 11a5293 commit 8c9498c

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

k8s/gen-k8s-env.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
[parameter(Mandatory=$true)][string]$location,
44
[parameter(Mandatory=$true)][string]$registryName,
55
[parameter(Mandatory=$true)][string]$orchestratorName,
6-
[parameter(Mandatory=$true)][string]$dnsName
6+
[parameter(Mandatory=$true)][string]$dnsName,
7+
[parameter(Mandatory=$true)][string]$createAcr=$true
78
)
89

910
# Create resource group
1011
Write-Host "Creating resource group..." -ForegroundColor Yellow
1112
az group create --name=$resourceGroupName --location=$location
1213

13-
# Create Azure Container Registry
14-
Write-Host "Creating Azure Container Registry..." -ForegroundColor Yellow
15-
az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic
14+
if ($createAcr) {
15+
# Create Azure Container Registry
16+
Write-Host "Creating Azure Container Registry..." -ForegroundColor Yellow
17+
az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic
18+
}
1619

1720
# Create kubernetes orchestrator
1821
Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow

0 commit comments

Comments
 (0)