Skip to content
Snippets Groups Projects
Commit bf185a6f authored by OZGCloud's avatar OZGCloud
Browse files

ozg-5634 use new ingress url

parent 752c060b
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,16 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{ printf "https://%s.%s" (include "app.ozgcloudBezeichner" .) (required "baseUrl must be set" .Values.baseUrl) }}
{{- end -}}
{{- define "app.userManagerUrl" -}}
{{- if .Values.userManagerUrl -}}
{{ .Values.userManagerUrl }}
{{- else if (.Values.ingress).disabled -}}
{{ printf "https://%s.%s/user-manager" (include "app.ozgcloudBezeichner" .) (include "app.baseUrl" .) }}
{{- else -}}
{{ printf "https://%s" (include "app.baseDomain" .) }}
{{- end -}}
{{- end -}}
{{- define "app.replaceAllNonAlphanumeric" -}}
{{- regexReplaceAll "[^a-zA-Z0-9]" . "" }}
{{- end -}}
......
......@@ -100,7 +100,7 @@ spec:
- name: KEYCLOAK_URL
value: {{ include "app.ssoServerUrl" . }}
- name: OZGCLOUD_USER_MANAGER_URL
value: https://{{ include "app.baseDomain" . }}
value: {{ include "app.userManagerUrl" . }}
{{- if ((.Values.ozgcloud).usersync).period }}
- name: OZGCLOUD_USERSYNC_PERIOD
value: {{ .Values.ozgcloud.usersync.period }}
......
......@@ -46,7 +46,7 @@ tests:
name: OZGCLOUD_USER_MANAGER_URL
value: https://helm-user-manager.test.company.local
- it: set baseDomain for ozgcloud_user_manager_url
- it: set baseDomain for ozgcloud_user_manager_url as default
set:
baseDomain: helm-usm.test.company.local
asserts:
......@@ -55,3 +55,23 @@ tests:
content:
name: OZGCLOUD_USER_MANAGER_URL
value: https://helm-usm.test.company.local
- it: set ozgcloud_user_manager_url
set:
userManagerUrl: https://user-manager.test.company.local
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_USER_MANAGER_URL
value: https://user-manager.test.company.local
- it: should use new user-manager ingress url
set:
ingress.disabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_USER_MANAGER_URL
value: https://helm.test.company.local/user-manager
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment