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

Merge branch 'master' into OZG-4731-e2e-test-for-Aktenzeichen-manuell-eingeben

parents f11fabb3 9be94d99
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,8 @@
</parent>
<artifactId>alfa-xdomea</artifactId>
<name>Alfa XDomea</name>
<description>Alfa XDomea implementation</description>
<name>Alfa xdomea</name>
<description>Alfa xdomea implementation</description>
<packaging>jar</packaging>
<properties>
......
......@@ -58,7 +58,7 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{ printf "%s.%s:9000" ( coalesce .Values.usermanagerName "user-manager" ) .Release.Namespace }}
{{- end -}}
{{- define "app.baseUrlDirect" -}}
{{- define "app.baseUrl" -}}
{{- required "baseUrl muss angegeben sein" .Values.baseUrl }}
{{- end -}}
......@@ -66,7 +66,7 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- if (.Values).usermanagerUrl -}}
{{ printf "%s" (.Values).usermanagerUrl }}
{{- else -}}
{{ printf "https://%s-%s.%s" (include "app.ozgcloudBezeichner" .) .Values.usermanagerName (include "app.baseUrlDirect" .) }}
{{ printf "https://%s-%s.%s" (include "app.ozgcloudBezeichner" .) .Values.usermanagerName (include "app.baseUrl" .) }}
{{- end -}}
{{- end -}}
......@@ -82,8 +82,8 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- define "app.ozgcloudBezeichner" -}}
{{- required "ozgcloud.bezeichner muss angegeben sein" (.Values.ozgcloud).bezeichner -}}
{{- if lt 27 (len (.Values.ozgcloud).bezeichner) -}}
{{ fail (printf "ozgcloud.bezeichner %s ist zu lang (max. 27 Zeichen)" (.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 -}}
......@@ -117,8 +117,8 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- required "sso.serverUrl muss angegeben sein" (.Values.sso).serverUrl -}}
{{- end -}}
{{- define "app.baseUrl" -}}
{{ printf "https://%s.%s" (include "app.ozgcloudBezeichner" .) .Values.baseUrl }}
{{- define "app.baseDomain" -}}
{{- printf "%s.%s" (include "app.ozgcloudBezeichner" .) (include "app.baseUrl" .) }}
{{- end -}}
{{- define "app.generateKeycloakGroupRessourceName" -}}
......
......@@ -52,10 +52,10 @@ spec:
name: {{ include "app.name" . }}
path: ''
pathType: ImplementationSpecific
host: {{ trimPrefix "https://" ( include "app.baseUrl" . ) }}
host: {{ include "app.baseDomain" . }}
tls:
- hosts:
- {{ trimPrefix "https://" ( include "app.baseUrl" . ) }}
- {{ include "app.baseDomain" . }}
{{- if (.Values.ingress).tlsSecretName }}
secretName: {{ (.Values.ingress).tlsSecretName }}
{{- else if ne (.Values).cluster_env "dataport" }}
......
......@@ -21,7 +21,7 @@ spec:
{{- if $client.client_base_url }}
client_base_url: {{ $client.client_base_url }}
{{- else }}
client_base_url: {{ include "app.baseUrl" $ }}
client_base_url: https://{{ include "app.baseDomain" $ }}
{{- end }}
{{- if $client.client_web_origins }}
client_web_origins:
......@@ -30,7 +30,7 @@ spec:
{{- end }}
{{- else }}
client_web_origins:
- {{ include "app.baseUrl" $ }}
- https://{{ include "app.baseDomain" $ }}
{{- end }}
{{- if $client.override_redirect_uris }}
client_redirect_uris:
......@@ -39,8 +39,8 @@ spec:
{{- end }}
{{- else }}
client_redirect_uris:
- {{ include "app.baseUrl" $ }}
- {{ include "app.baseUrl" $ }}/*
- https://{{ include "app.baseDomain" $ }}
- https://{{ include "app.baseDomain" $ }}/*
{{- if $client.additional_redirect_uris }}
{{- with $client.additional_redirect_uris }}
{{ toYaml . | indent 4 }}
......
......@@ -17,6 +17,7 @@ metadata:
{{- end }}
spec:
keep_after_delete: {{ $.Values.sso.keep_after_delete | default false }}
update_user: {{ $user.update_user | default false }}
keycloak_user:
username: {{ $user.name | lower }}
first_name: {{ $user.first_name | default "" }}
......
......@@ -36,5 +36,5 @@ spec:
image: busybox
command: ['wget']
args:
- {{ include "app.baseUrl" . }}
- {{ include "app.baseDomain" . }}
restartPolicy: Never
......@@ -36,6 +36,8 @@ set:
tests:
- it: check ingress annotaions for nginx
set:
baseUrl: "test.by.ozg-cloud.de"
asserts:
- isKind:
of: Ingress
......
#
# Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den
# Ministerpräsidenten des Landes Schleswig-Holstein
# Staatskanzlei
# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung
#
# Lizenziert unter der EUPL, Version 1.2 oder - sobald
# diese von der Europäischen Kommission genehmigt wurden -
# Folgeversionen der EUPL ("Lizenz");
# Sie dürfen dieses Werk ausschließlich gemäß
# dieser Lizenz nutzen.
# Eine Kopie der Lizenz finden Sie hier:
#
# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
#
# Sofern nicht durch anwendbare Rechtsvorschriften
# gefordert oder in schriftlicher Form vereinbart, wird
# die unter der Lizenz verbreitete Software "so wie sie
# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN -
# ausdrücklich oder stillschweigend - verbreitet.
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
suite: test ozgcloud bezeichner length
release:
name: alfa
namespace: sh-helm-test
templates:
- templates/deployment.yaml
tests:
- it: should fail on bezeichner length longer than 46 characters
template: deployment.yaml
set:
ozgcloud:
bezeichner: test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890
environment: test
bundesland: by
asserts:
- failedTemplate:
errorMessage: ozgcloud.bezeichner test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 ist zu lang (max. 46 Zeichen)
\ No newline at end of file
......@@ -33,6 +33,8 @@ set:
bundesland: by
bezeichner: helm
environment: test
baseUrl: test.by.ozg-cloud.de
tests:
- it: should create ingress tls
asserts:
......@@ -86,3 +88,15 @@ tests:
- equal:
path: spec.ingressClassName
value: nginx
- it: should create hostname correctly
asserts:
- equal:
path: spec.rules[0].host
value: helm.test.by.ozg-cloud.de
- it: should create tls hosts name correctly
asserts:
- equal:
path: spec.tls[0].hosts[0]
value: helm.test.by.ozg-cloud.de
\ No newline at end of file
......@@ -36,6 +36,7 @@ set:
tests:
- it: should contain header data
set:
baseUrl: "test.by.ozg-cloud.de"
sso:
keycloak_clients:
- client_name: alfa
......@@ -46,6 +47,7 @@ tests:
of: OzgCloudKeycloakClient
- it: should have metadata
set:
baseUrl: "test.by.ozg-cloud.de"
sso:
keycloak_clients:
- client_name: alfa
......@@ -58,6 +60,7 @@ tests:
value: by-helm-test
- it: should contain header data for kopOperator
set:
baseUrl: "test.by.ozg-cloud.de"
sso:
keycloak_clients:
- client_name: alfa
......@@ -69,6 +72,7 @@ tests:
of: KopKeycloakClient
- it: should have annotations for kopOperator
set:
baseUrl: "test.by.ozg-cloud.de"
sso:
keycloak_clients:
- client_name: alfa
......
......@@ -564,3 +564,24 @@ tests:
asserts:
- hasDocuments:
count: 0
- it: should set updateUser
set:
sso:
api_users:
- name: testapiuser
update_user: true
asserts:
- equal:
path: spec.update_user
value: true
- it: should set default updateUser to false
set:
sso:
api_users:
- name: testapiuser
asserts:
- equal:
path: spec.update_user
value: false
\ 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