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

OZG-4183 OZG-4584 rename kop to ozgcloud

parent 481870f9
Branches
Tags
No related merge requests found
......@@ -32,7 +32,7 @@ app.kubernetes.io/instance: user-manager
app.kubernetes.io/managed-by: {{ include "app.managedBy" . }}
app.kubernetes.io/name: {{ include "app.name" . }}
app.kubernetes.io/namespace: {{ include "app.namespace" . }}
app.kubernetes.io/part-of: kop
app.kubernetes.io/part-of: ozgcloud
app.kubernetes.io/version: {{ include "app.version" . }}
helm.sh/chart: {{ include "app.chart" . }}
{{- end -}}
......@@ -52,8 +52,8 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- printf "%d %d * * *" (div (randNumeric 2) 2) (div (randNumeric 1) 2) -}}
{{- end -}}
{{- define "app.kopEnvironment" -}}
{{- required "Environment muss angegeben sein" (.Values.kop).environment -}}
{{- define "app.ozgcloudEnvironment" -}}
{{- required "Environment muss angegeben sein" (.Values.ozgcloud).environment -}}
{{- end -}}
{{- define "app.ssoServerUrl" -}}
......@@ -64,26 +64,26 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- end -}}
{{- end -}}
{{- define "app.kopBundesland" -}}
{{- required "kop.bundesland must be set " (.Values.kop).bundesland }}
{{- define "app.ozgcloudBundesland" -}}
{{- required "ozgcloud.bundesland must be set " (.Values.ozgcloud).bundesland }}
{{- end -}}
{{- define "app.kopBezeichner" -}}
{{- if (.Values.kop).bezeichner -}}
{{- define "app.ozgcloudBezeichner" -}}
{{- if (.Values.ozgcloud).bezeichner -}}
{{ $length := len (.Values.kop).bezeichner }}
{{ $length := len (.Values.ozgcloud).bezeichner }}
{{- if lt 27 $length -}}
{{ required (printf "Bezeichner %s ist zu lang (max. 27 Zeichen)" (.Values.kop).bezeichner) nil }}
{{ required (printf "Bezeichner %s ist zu lang (max. 27 Zeichen)" (.Values.ozgcloud).bezeichner) nil }}
{{- else -}}
{{- required "Bezeichner muss angegeben sein" (.Values.kop).bezeichner -}}
{{- required "Bezeichner muss angegeben sein" (.Values.ozgcloud).bezeichner -}}
{{- end -}}
{{- else -}}
{{- required "Bezeichner muss angegeben sein" (.Values.kop).bezeichner -}}
{{- required "Bezeichner muss angegeben sein" (.Values.ozgcloud).bezeichner -}}
{{- end -}}
{{- end -}}
{{- define "app.ssoRealm" -}}
{{ printf "%s-%s-%s" (include "app.kopBundesland" .) ( include "app.kopBezeichner" . ) ( include "app.kopEnvironment" . ) | trunc 63 | trimSuffix "-" }}
{{ printf "%s-%s-%s" (include "app.ozgcloudBundesland" .) ( include "app.ozgcloudBezeichner" . ) ( include "app.ozgcloudEnvironment" . ) | trunc 63 | trimSuffix "-" }}
{{- end -}}
{{- define "app.ssoClientName" -}}
......@@ -95,11 +95,11 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- end -}}
{{- define "app.baseUrl" -}}
{{ printf "https://%s-%s.%s" (include "app.kopBezeichner" .) (include "app.name" .) .Values.baseUrl }}
{{ printf "https://%s-%s.%s" (include "app.ozgcloudBezeichner" .) (include "app.name" .) .Values.baseUrl }}
{{- end -}}
{{- define "app.alfaAddress" -}}
{{ printf "https://%s.%s" (include "app.kopBezeichner" .) .Values.baseUrl }}
{{ printf "https://%s.%s" (include "app.ozgcloudBezeichner" .) .Values.baseUrl }}
{{- end -}}
{{- define "app.replaceAllNonAlphanumeric" -}}
......
......@@ -55,5 +55,5 @@ spec:
- hosts:
- {{ trimPrefix "https://" ( include "app.baseUrl" . ) }}
{{- if ne (.Values).cluster_env "dataport" }}
secretName: {{ .Values.kop.bezeichner }}-{{ include "app.name" . }}-tls
secretName: {{ .Values.ozgcloud.bezeichner }}-{{ include "app.name" . }}-tls
{{- end }}
\ No newline at end of file
......@@ -41,7 +41,7 @@ tests:
value: user-manager
- equal:
path: metadata.labels.[app.kubernetes.io/part-of]
value: kop
value: ozgcloud
- equal:
path: metadata.labels.[app.kubernetes.io/namespace]
value: sh-helm-test
......
......@@ -31,7 +31,7 @@ templates:
tests:
- it: should mount volumes for user-manager root ca
set:
kop.environment: dev
ozgcloud.environment: dev
asserts:
- contains:
path: spec.template.spec.containers[0].volumeMounts
......
......@@ -53,7 +53,7 @@ tests:
value: by-helm-test
- it: should have default Values
set:
kop:
ozgcloud:
bundesland: by
bezeichner: helm
environment: test
......@@ -85,7 +85,7 @@ tests:
- it: should have Keycloak User without roles
set:
kop:
ozgcloud:
bundesland: by
bezeichner: helm
environment: test
......@@ -122,7 +122,7 @@ tests:
- it: should have Keycloak User with client role
set:
kop:
ozgcloud:
bundesland: by
bezeichner: helm
environment: test
......@@ -165,7 +165,7 @@ tests:
- it: should have Keycloak User with realm role
set:
kop:
ozgcloud:
bundesland: by
bezeichner: helm
environment: test
......@@ -206,7 +206,7 @@ tests:
- it: should have Keycloak User with group
set:
kop:
ozgcloud:
bundesland: by
bezeichner: helm
environment: test
......@@ -247,7 +247,7 @@ tests:
- it: should have lowercase username
set:
kop:
ozgcloud:
bundesland: by
bezeichner: helm
environment: test
......
......@@ -24,12 +24,10 @@
baseUrl: test.sh.ozg-cloud.de
kop:
ozgcloud:
bundesland: sh
bezeichner: helm
environment: test
ozgcloud:
keycloak:
api:
password: geheim
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment