From e3807fa2a5ac136142fe39d7863473b8957eb69b Mon Sep 17 00:00:00 2001 From: eiximenis Date: Thu, 21 Jun 2018 18:06:12 +0200 Subject: [PATCH] Fixed pathBase generation for apigwws Need to apply this change on the others --- k8s/helm/apigwws/templates/_names.tpl | 10 ++++++---- k8s/helm/apigwws/templates/deployment.yaml | 2 +- k8s/helm/apigwws/templates/ingress.yaml | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/k8s/helm/apigwws/templates/_names.tpl b/k8s/helm/apigwws/templates/_names.tpl index 7e817f9b7..c1111b058 100644 --- a/k8s/helm/apigwws/templates/_names.tpl +++ b/k8s/helm/apigwws/templates/_names.tpl @@ -40,10 +40,12 @@ {{ define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if $ctx.Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" $ctx -}} +{{- printf "/%s-%s" $name $suffix -}} {{- else -}} -{{- .Values.pathBase -}} +{{- printf "/%s" $name -}} {{- end -}} {{- end -}} \ No newline at end of file diff --git a/k8s/helm/apigwws/templates/deployment.yaml b/k8s/helm/apigwws/templates/deployment.yaml index b3a5f1e92..8fad50098 100644 --- a/k8s/helm/apigwws/templates/deployment.yaml +++ b/k8s/helm/apigwws/templates/deployment.yaml @@ -45,7 +45,7 @@ spec: mountPath: /app/configuration env: - name: PATH_BASE - value: {{ include "pathBase" . }} + value: {{ include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) }} - name: k8sname value: {{ .Values.clusterName }} {{- if .Values.env.values -}} diff --git a/k8s/helm/apigwws/templates/ingress.yaml b/k8s/helm/apigwws/templates/ingress.yaml index b8956ce77..bb19d2b19 100644 --- a/k8s/helm/apigwws/templates/ingress.yaml +++ b/k8s/helm/apigwws/templates/ingress.yaml @@ -1,6 +1,6 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "apigwws.fullname" . -}} -{{- $ingressPath := include "pathBase" . -}} +{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: