Updated helm charts to support devspaces
This commit is contained in:
parent
e310a525fe
commit
631696c4ae
5
.gitignore
vendored
5
.gitignore
vendored
@ -266,3 +266,8 @@ pub/
|
||||
|
||||
# Ignore HealthCheckdb
|
||||
*healthchecksdb*
|
||||
|
||||
# Ignores all extra inf.yaml and app.yaml that are copied by prepare-devspaces.ps1
|
||||
src/**/app.yaml
|
||||
src/**/inf.yaml
|
||||
|
||||
|
@ -61,7 +61,7 @@ spec:
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /app/configuration
|
||||
mountPath: {{ .Values.ocelot.configPath }}
|
||||
env:
|
||||
- name: PATH_BASE
|
||||
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) }}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) -}}
|
||||
{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
@ -23,11 +24,13 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.inf.k8s.dns }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
serviceName: {{ .Values.app.svc.mobilemarketingapigw }}
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -62,3 +62,5 @@ probes:
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 60
|
||||
port: 80
|
||||
ocelot:
|
||||
configPath: /app/configuration
|
||||
|
@ -61,7 +61,7 @@ spec:
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /app/configuration
|
||||
mountPath: {{ .Values ocelot.configPath }}
|
||||
env:
|
||||
- name: PATH_BASE
|
||||
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) }}
|
||||
|
@ -62,3 +62,5 @@ probes:
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 60
|
||||
port: 80
|
||||
ocelot:
|
||||
configPath: /app/configuration
|
@ -61,7 +61,7 @@ spec:
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /app/configuration
|
||||
mountPath: {{ .Values ocelot.configPath }}
|
||||
env:
|
||||
- name: PATH_BASE
|
||||
value: {{ include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) }}
|
||||
|
@ -62,3 +62,5 @@ probes:
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 60
|
||||
port: 80
|
||||
ocelot:
|
||||
configPath: /app/configuration
|
@ -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
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $ingressPath := include "pathBase" . -}}
|
||||
{{- $serviceName := .Values.app.svc.mvc -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
@ -23,11 +24,13 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.inf.k8s.dns }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
serviceName: {{ .Values.app.svc.mvc }}
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user