Fixed pathBase generation for apigwws

Need to apply this change on the others
This commit is contained in:
eiximenis 2018-06-21 18:06:12 +02:00
parent 59729c74ea
commit e3807fa2a5
3 changed files with 8 additions and 6 deletions

View File

@ -40,10 +40,12 @@
{{ define "pathBase" -}} {{ define "pathBase" -}}
{{- if .Values.inf.k8s.suffix -}} {{- $name := first .}}
{{- $suffix := include "suffix-name" . -}} {{- $ctx := last .}}
{{- printf "%s-%s" .Values.pathBase $suffix -}} {{- if $ctx.Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" $ctx -}}
{{- printf "/%s-%s" $name $suffix -}}
{{- else -}} {{- else -}}
{{- .Values.pathBase -}} {{- printf "/%s" $name -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}

View File

@ -45,7 +45,7 @@ spec:
mountPath: /app/configuration mountPath: /app/configuration
env: env:
- name: PATH_BASE - name: PATH_BASE
value: {{ include "pathBase" . }} value: {{ include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) }}
- name: k8sname - name: k8sname
value: {{ .Values.clusterName }} value: {{ .Values.clusterName }}
{{- if .Values.env.values -}} {{- if .Values.env.values -}}

View File

@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
{{- $fullName := include "apigwws.fullname" . -}} {{- $fullName := include "apigwws.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}} {{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata: