8000 devspaces scripts · ITCSsDeveloper/eShopOnContainers@1f762a6 · GitHub
Skip to content

Commit 1f762a6

Browse files
committed
devspaces scripts
1 parent 40205f0 commit 1f762a6

36 files changed

Lines changed: 357 additions & 51 deletions

File tree

k8s/helm/apigwmm/templates/_names.tpl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@
3333
{{- end -}}
3434

3535

36+
3637
{{- define "pathBase" -}}
37-
{{- $name := first .}}
38-
{{- $ctx := last .}}
39-
{{- if $ctx.Values.inf.k8s.suffix -}}
40-
{{- $suffix := include "suffix-name" $ctx -}}
41-
{{- printf "/%s-%s" $name $suffix -}}
38+
{{- if .Values.inf.k8s.suffix -}}
39+
{{- $suffix := include "suffix-name" . -}}
40+
{{- printf "%s-%s" .Values.pathBase $suffix -}}
4241
{{- else -}}
43-
{{- printf "/%s" $name -}}
42+
{{- .Values.pathBase -}}
4443
{{- end -}}
4544
{{- end -}}
4645

k8s/helm/apigwmm/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ spec:
6464
mountPath: {{ .Values.ocelot.configPath }}
6565
env:
6666
- name: PATH_BASE
67-
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) }}
67+
value: {{ include "pathBase" . }}
6868
- name: k8sname
6969
value: {{ .Values.clusterName }}
7070
{{- if .Values.env.values -}}

k8s/helm/apigwmm/templates/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.ingress.enabled -}}
2-
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) -}}
2+
{{- $ingressPath := include "pathBase" . -}}
33
{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}}
44
apiVersion: extensions/v1beta1
55
kind: Ingress

k8s/helm/apigwms/templates/_names.tpl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@
3535

3636

3737
{{- define "pathBase" -}}
38-
{{- $name := first .}}
39-
{{- $ctx := last .}}
40-
{{- if $ctx.Values.inf.k8s.suffix -}}
41-
{{- $suffix := include "suffix-name" $ctx -}}
42-
{{- printf "/%s-%s" $name $suffix -}}
38+
{{- if .Values.inf.k8s.suffix -}}
39+
{{- $suffix := include "suffix-name" . -}}
40+
{{- printf "%s-%s" .Values.pathBase $suffix -}}
4341
{{- else -}}
44-
{{- printf "/%s" $name -}}
42+
{{- .Values.pathBase -}}
4543
{{- end -}}
4644
{{- end -}}
4745

k8s/helm/apigwms/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ spec:
6161
imagePullPolicy: {{ .Values.image.pullPolicy }}
6262
volumeMounts:
6363
- name: config
64-
mountPath: {{ .Values ocelot.configPath }}
64+
mountPath: {{ .Values.ocelot.configPath }}
6565
env:
6666
- name: PATH_BASE
67-
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) }}
67+
value: {{ include "pathBase" . }}
6868
- name: k8sname
6969
value: {{ .Values.clusterName }}
7070
{{- if .Values.env.values -}}

k8s/helm/apigwms/templates/ingress.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{{- if .Values.ingress.enabled -}}
2-
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) -}}
2+
{{- $ingressPath := include "pathBase" . -}}
3+
{{- $serviceName := .Values.app.svc.mobileshoppingapigw -}}
4+
35
apiVersion: extensions/v1beta1
46
kind: Ingress
57
metadata:
@@ -23,11 +25,13 @@ spec:
2325
{{- end }}
2426
{{- end }}
2527
rules:
26-
- host: {{ .Values.inf.k8s.dns }}
28+
{{- range .Values.ingress.hosts }}
29+
- host: {{ . }}
2730
http:
2831
paths:
2932
- path: {{ $ingressPath }}
3033
backend:
31-
serviceName: {{ .Values.app.svc.mobileshoppingapigw }}
34+
serviceName: {{ $serviceName }}
3235
servicePort: http
36+
{{- end }}
3337
{{- end }}

k8s/helm/apigwwm/templates/_names.tpl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@
3535

3636

3737
{{- define "pathBase" -}}
38-
{{- $name := first .}}
39-
{{- $ctx := last .}}
40-
{{- if $ctx.Values.inf.k8s.suffix -}}
41-
{{- $suffix := include "suffix-name" $ctx -}}
42-
{{- printf "/%s-%s" $name $suffix -}}
38+
{{- if .Values.inf.k8s.suffix -}}
39+
{{- $suffix := include "suffix-name" . -}}
40+
{{- printf "%s-%s" .Values.pathBase $suffix -}}
4341
{{- else -}}
44-
{{- printf "/%s" $name -}}
42+
{{- .Values.pathBase -}}
4543
{{- end -}}
4644
{{- end -}}
4745

k8s/helm/apigwwm/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ spec:
6161
imagePullPolicy: {{ .Values.image.pullPolicy }}
6262
volumeMounts:
6363
- name: config
64-
mountPath: {{ .Values ocelot.configPath }}
64+
mountPath: {{ .Values.ocelot.configPath }}
6565
env:
6666
- name: PATH_BASE
67-
value: {{ include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) }}
67+
value: {{ include "pathBase" . }}
6868
- name: k8sname
6969
value: {{ .Values.clusterName }}
7070
{{- if .Values.env.values -}}

k8s/helm/apigwwm/templates/ingress.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{{- if .Values.ingress.enabled -}}
2-
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) -}}
2+
{{- $ingressPath := include "pathBase" . -}}
3+
{{- $serviceName := .Values.app.svc.webmarketingapigw -}}
4+
35
apiVersion: extensions/v1beta1
46
kind: Ingress
57
metadata:
@@ -23,11 +25,13 @@ spec:
2325
{{- end }}
2426
{{- end }}
2527
rules:
26-
- host: {{ .Values.inf.k8s.dns }}
28+
{{- range .Values.ingress.hosts }}
29+
- host: {{ . }}
2730
http:
2831
paths:
2932
- path: {{ $ingressPath }}
3033
backend:
31-
serviceName: {{ .Values.app.svc.webmarketingapigw }}
34+
serviceName: {{ $serviceName }}
3235
servicePort: http
36+
{{- end }}
3337
{{- end }}

k8s/helm/apigwws/templates/_names.tpl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@
3333
{{- end -}}
3434

3535

36+
3637
{{- define "pathBase" -}}
37-
{{- $name := first .}}
38-
{{- $ctx := last .}}
39-
{{- if $ctx.Values.inf.k8s.suffix -}}
40-
{{- $suffix := include "suffix-name" $ctx -}}
41-
{{- printf "/%s-%s" $name $suffix -}}
38+
{{- if .Values.inf.k8s.suffix -}}
39+
{{- $suffix := include "suffix-name" . -}}
40+
{{- printf "%s-%s" .Values.pathBase $suffix -}}
4241
{{- else -}}
43-
{{- printf "/%s" $name -}}
42+
{{- .Values.pathBase -}}
4443
{{- end -}}
4544
{{- end -}}
4645

0 commit comments

Comments
 (0)