|
|
@ -5,6 +5,7 @@ Param( |
|
|
|
[parameter(Mandatory=$false)][string]$externalDns, |
|
|
|
[parameter(Mandatory=$false)][string]$appName="eshop", |
|
|
|
[parameter(Mandatory=$false)][bool]$deployInfrastructure=$true, |
|
|
|
[parameter(Mandatory=$false)][bool]$deployCharts=$true, |
|
|
|
[parameter(Mandatory=$false)][bool]$clean=$true, |
|
|
|
[parameter(Mandatory=$false)][string]$aksName="", |
|
|
|
[parameter(Mandatory=$false)][string]$aksRg="", |
|
|
@ -66,21 +67,29 @@ $charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-a |
|
|
|
if ($deployInfrastructure) { |
|
|
|
foreach ($infra in $infras) { |
|
|
|
Write-Host "Installing infrastructure: $infra" -ForegroundColor Green |
|
|
|
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --name="$appName-$infra" $infra |
|
|
|
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --name="$appName-$infra" $infra |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
Write-Host "eShopOnContainers infrastructure (bbdd, redis, ...) charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow |
|
|
|
} |
|
|
|
|
|
|
|
foreach ($chart in $charts) { |
|
|
|
Write-Host "Installing: $chart" -ForegroundColor Green |
|
|
|
if ($useCustomRegistry) { |
|
|
|
helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart |
|
|
|
} |
|
|
|
else { |
|
|
|
if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed |
|
|
|
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart |
|
|
|
if ($deployCharts) { |
|
|
|
foreach ($chart in $charts) { |
|
|
|
Write-Host "Installing: $chart" -ForegroundColor Green |
|
|
|
if ($useCustomRegistry) { |
|
|
|
helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart |
|
|
|
} |
|
|
|
else { |
|
|
|
if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed |
|
|
|
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
Write-Host "eShopOnContainers non-infrastructure charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow |
|
|
|
} |
|
|
|
|
|
|
|
Write-Host "helm charts installed." -ForegroundColor Green |
|
|
|
|
|
|
|