|
5 | 5 | [parameter(Mandatory=$false)][string]$externalDns, |
6 | 6 | [parameter(Mandatory=$false)][string]$appName="eshop", |
7 | 7 | [parameter(Mandatory=$false)][bool]$deployInfrastructure=$true, |
| 8 | + [parameter(Mandatory=$false)][bool]$deployCharts=$true, |
8 | 9 | [parameter(Mandatory=$false)][bool]$clean=$true, |
9 | 10 | [parameter(Mandatory=$false)][string]$aksName="", |
10 | 11 | [parameter(Mandatory=$false)][string]$aksRg="", |
@@ -66,21 +67,29 @@ $charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-a |
66 | 67 | if ($deployInfrastructure) { |
67 | 68 | foreach ($infra in $infras) { |
68 | 69 | Write-Host "Installing infrastructure: $infra" -ForegroundColor Green |
69 | | - helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --name="$appName-$infra" $infra |
| 70 | + 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 |
70 | 71 | } |
71 | 72 | } |
| 73 | +else { |
| 74 | + Write-Host "eShopOnContainers infrastructure (bbdd, redis, ...) charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow |
| 75 | +} |
72 | 76 |
|
73 | | -foreach ($chart in $charts) { |
74 | | - Write-Host "Installing: $chart" -ForegroundColor Green |
75 | | - if ($useCustomRegistry) { |
76 | | - 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 |
77 | | - } |
78 | | - else { |
79 | | - if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed |
80 | | - 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 |
| 77 | +if ($deployCharts) { |
| 78 | + foreach ($chart in $charts) { |
| 79 | + Write-Host "Installing: $chart" -ForegroundColor Green |
| 80 | + if ($useCustomRegistry) { |
| 81 | + 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 |
| 82 | + } |
| 83 | + else { |
| 84 | + if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed |
| 85 | + 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 |
| 86 | + } |
81 | 87 | } |
82 | 88 | } |
83 | 89 | } |
| 90 | +else { |
| 91 | + Write-Host "eShopOnContainers non-infrastructure charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow |
| 92 | +} |
84 | 93 |
|
85 | 94 | Write-Host "helm charts installed." -ForegroundColor Green |
86 | 95 |
|
|
0 commit comments