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

OZG-3034 OZG-6684 Cleanup

parent 89edd2ad
Branches
Tags
No related merge requests found
......@@ -53,17 +53,6 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- required "ozgcloud.environment muss angegeben sein" (.Values.ozgcloud).environment -}}
{{- end -}}
{{- define "app.baseUrl" -}}
{{- required "baseUrl muss angegeben sein" .Values.baseUrl }}
{{- end -}}
{{- define "app.ozgcloudBezeichner" -}}
{{- required "ozgcloud.bezeichner muss angegeben sein" (.Values.ozgcloud).bezeichner -}}
{{- if lt 46 (len (.Values.ozgcloud).bezeichner) -}}
{{ fail (printf "ozgcloud.bezeichner %s ist zu lang (max. 46 Zeichen)" (.Values.ozgcloud).bezeichner) }}
{{- end -}}
{{- end -}}
{{- define "app.vorgangManagerDatabase" -}}
{{- if (.Values.database).databaseName -}}
{{ .Values.database.databaseName }}
......@@ -147,7 +136,11 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- if .Values.alfaHost -}}
{{ .Values.alfaHost | quote }}
{{- else -}}
{{ printf "https://%s.%s" (include "app.ozgcloudBezeichner" .) (include "app.baseUrl" .) }}
{{- $bezeichner := default "" (.Values.ozgcloud).bezeichner -}}
{{- $baseUrl := default "" .Values.baseUrl -}}
{{- if and $bezeichner $baseUrl -}}
{{ print "https://" $bezeichner "." $baseUrl | quote }}
{{- end -}}
{{- end -}}
{{- end -}}
......
......@@ -52,8 +52,6 @@ env:
# password: sk9t2dfsadf20@.
# username: sh-kiel-vorgang-manager-dev
alfaName: alfa
vorgangmanagerName: vorgang-manager
usermanagerName: user-manager
......
......@@ -23,7 +23,6 @@
#
ozgcloud:
bezeichner: helm
environment: test
infoManager:
address: https://info-manager.my-wonderful-domain.local:9000
......
......@@ -29,13 +29,15 @@ release:
templates:
- templates/deployment.yaml
set:
baseUrl: test.company.local
ozgcloud:
environment: dev
bezeichner: helm
imagePullSecret: test-image-pull-secret
tests:
- it: should set the alfa host
set:
baseUrl: test.company.local
ozgcloud:
bezeichner: helm
asserts:
- contains:
path: spec.template.spec.containers[0].env
......@@ -51,3 +53,36 @@ tests:
content:
name: ozgcloud_alfa_host
value: https://hamburg.mein-kreis.de
- it: should not set alfa host if bezeichner is not set
set:
baseUrl: test.company.local
ozgcloud:
bezeichner:
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_alfa_host
value:
- it: should not set alfa host if base url is not set
set:
baseUrl:
ozgcloud:
bezeichner: helm
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_alfa_host
value:
- it: should not set alfa host if both bezeichner and base url are not set
set:
baseUrl:
ozgcloud:
bezeichner:
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_alfa_host
value:
\ No newline at end of file
ozgcloud:
bezeichner: helm
\ 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