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

set baseDomain

parent 0ec284b6
No related branches found
No related tags found
No related merge requests found
......@@ -99,8 +99,12 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- end -}}
{{- define "app.baseDomain" -}}
{{- if (.Values.baseDomain) -}}
{{ .Values.baseDomain }}
{{- else -}}
{{ printf "%s-%s.%s" (include "app.ozgcloudBezeichner" .) (include "app.name" .) (include "app.baseUrl" .) }}
{{- end -}}
{{- end -}}
{{- define "app.alfaAddress" -}}
{{ printf "https://%s.%s" (include "app.ozgcloudBezeichner" .) (required "baseUrl must be set" .Values.baseUrl) }}
......
......@@ -45,3 +45,14 @@ tests:
content:
name: OZGCLOUD_USER_MANAGER_URL
value: https://helm-user-manager.test.company.local
- it: set baseDomain for ozgcloud_user_manager_url
template: deployment.yaml
set:
baseDomain: helm-usm.test.company.local
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_USER_MANAGER_URL
value: https://helm-usm.test.company.local
\ No newline at end of file
......@@ -93,3 +93,19 @@ tests:
- equal:
path: spec.tls[0].hosts[0]
value: helm-user-manager.test.sh.ozg-cloud.de
- it: should set ingress host
set:
baseDomain: helm-usm.test.company.local
asserts:
- equal:
path: spec.rules[0].host
value: helm-usm.test.company.local
- it: should set ingress tls host
set:
baseDomain: helm-usm.test.company.local
asserts:
- equal:
path: spec.tls[0].hosts[0]
value: helm-usm.test.company.local
\ 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