diff --git a/src/main/helm/templates/_helpers.tpl b/src/main/helm/templates/_helpers.tpl index 2277556ced3553ea475b105264fc156bada77eb6..6e5cbc71da714de4e4fbe6c468347f95396b6cec 100644 --- a/src/main/helm/templates/_helpers.tpl +++ b/src/main/helm/templates/_helpers.tpl @@ -64,6 +64,8 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} {{- define "app.ozgcloud_user-manager_url" -}} {{- if (.Values).usermanagerUrl -}} {{ printf "%s" (.Values).usermanagerUrl }} +{{- else if (.Values).useNewUserManagerIngress -}} +{{ printf "https://%s.%s/user-manager" (include "app.ozgcloudBezeichner" .) (include "app.baseUrl" .) }} {{- else -}} {{ printf "https://%s-%s.%s" (include "app.ozgcloudBezeichner" .) .Values.usermanagerName (include "app.baseUrl" .) }} {{- end -}} diff --git a/src/test/helm/deployment_usermanager_address_env_test.yaml b/src/test/helm/deployment_usermanager_address_env_test.yaml index 028e532557a65b3874420f6447a806f67dd4508a..338ad50fc6d57e35aa5dc042e2867eb76474f360 100644 --- a/src/test/helm/deployment_usermanager_address_env_test.yaml +++ b/src/test/helm/deployment_usermanager_address_env_test.yaml @@ -56,3 +56,12 @@ tests: content: name: ozgcloud_user-manager_url value: http://test.domain.local + - it: should use new usermanager url + set: + useNewUserManagerIngress: true + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_user-manager_url + value: https://helm.test.company.local/user-manager