diff --git a/deploy/k8s/helm/mobileshoppingagg/templates/_names.tpl b/deploy/k8s/helm/mobileshoppingagg/templates/_names.tpl index d44859fea..605e92e7e 100644 --- a/deploy/k8s/helm/mobileshoppingagg/templates/_names.tpl +++ b/deploy/k8s/helm/mobileshoppingagg/templates/_names.tpl @@ -49,4 +49,12 @@ {{- else -}} {{- .Values.image.repository -}} {{- end -}} +{{- end -}} + +{{- define "protocol" -}} +{{- if .Values.inf.tls.enabled -}} +{{- printf "%s" "https" -}} +{{- else -}} +{{- printf "%s" "http" -}} +{{- end -}} {{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/mobileshoppingagg/templates/configmap.yaml b/deploy/k8s/helm/mobileshoppingagg/templates/configmap.yaml index b55afbdb2..cc66723d4 100644 --- a/deploy/k8s/helm/mobileshoppingagg/templates/configmap.yaml +++ b/deploy/k8s/helm/mobileshoppingagg/templates/configmap.yaml @@ -1,4 +1,6 @@ {{- $name := include "mobileshoppingagg.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $protocol := include "protocol" . -}} apiVersion: v1 kind: ConfigMap @@ -24,3 +26,4 @@ data: internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}" internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" + urls__IdentityUrlExternal: {{ $protocol }}://{{ $identity }} diff --git a/deploy/k8s/helm/mobileshoppingagg/values.yaml b/deploy/k8s/helm/mobileshoppingagg/values.yaml index fc7ce7a38..960601da0 100644 --- a/deploy/k8s/helm/mobileshoppingagg/values.yaml +++ b/deploy/k8s/helm/mobileshoppingagg/values.yaml @@ -57,6 +57,8 @@ env: key: internalurls__grpcCatalog - name: urls__grpcOrdering key: internalurls__grpcOrdering + - name: IdentityUrlExternal + key: urls__IdentityUrlExternal # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) values: - name: ASPNETCORE_ENVIRONMENT diff --git a/deploy/k8s/helm/webshoppingagg/templates/_names.tpl b/deploy/k8s/helm/webshoppingagg/templates/_names.tpl index d44859fea..605e92e7e 100644 --- a/deploy/k8s/helm/webshoppingagg/templates/_names.tpl +++ b/deploy/k8s/helm/webshoppingagg/templates/_names.tpl @@ -49,4 +49,12 @@ {{- else -}} {{- .Values.image.repository -}} {{- end -}} +{{- end -}} + +{{- define "protocol" -}} +{{- if .Values.inf.tls.enabled -}} +{{- printf "%s" "https" -}} +{{- else -}} +{{- printf "%s" "http" -}} +{{- end -}} {{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/webshoppingagg/templates/configmap.yaml b/deploy/k8s/helm/webshoppingagg/templates/configmap.yaml index b21de5a38..0bfb690c1 100644 --- a/deploy/k8s/helm/webshoppingagg/templates/configmap.yaml +++ b/deploy/k8s/helm/webshoppingagg/templates/configmap.yaml @@ -1,4 +1,6 @@ {{- $name := include "webshoppingagg.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $protocol := include "protocol" . -}} apiVersion: v1 kind: ConfigMap @@ -24,3 +26,4 @@ data: internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}" internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" + urls__IdentityUrlExternal: {{ $protocol }}://{{ $identity }} diff --git a/deploy/k8s/helm/webshoppingagg/values.yaml b/deploy/k8s/helm/webshoppingagg/values.yaml index 602dcf93a..b85210afa 100644 --- a/deploy/k8s/helm/webshoppingagg/values.yaml +++ b/deploy/k8s/helm/webshoppingagg/values.yaml @@ -57,6 +57,8 @@ env: key: internalurls__grpcCatalog - name: urls__grpcOrdering key: internalurls__grpcOrdering + - name: IdentityUrlExternal + key: urls__IdentityUrlExternal # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) values: