diff --git a/src/main/helm/templates/keycloak-client-crd.yaml b/src/main/helm/templates/keycloak_client_crd.yaml similarity index 92% rename from src/main/helm/templates/keycloak-client-crd.yaml rename to src/main/helm/templates/keycloak_client_crd.yaml index 309d37aec26a335d160324d876ceb62a9b464df1..c1f221861dececfec06a217d2370137f8a570f2c 100644 --- a/src/main/helm/templates/keycloak-client-crd.yaml +++ b/src/main/helm/templates/keycloak_client_crd.yaml @@ -10,15 +10,14 @@ spec: keep_after_delete: {{ $.Values.sso.keep_after_delete | default false }} client_name: {{ $client.client_name }} client_base_url: https://{{ include "app.baseDomain" $ }} -{{- if $client.client_web_origins }} + client_web_origins: + - https://{{ include "app.baseDomain" $ }} + {{- if $client.client_web_origins }} {{- with $client.client_web_origins }} {{ toYaml . | indent 4 }} {{- end }} -{{- else }} - client_web_origins: - - https://{{ include "app.baseDomain" $ }} -{{- end }} + {{- end }} client_redirect_uris: - https://{{ include "app.baseDomain" $ }} - https://{{ include "app.baseDomain" $ }}/* diff --git a/src/test/helm/keycloak_client_crd_test.yaml b/src/test/helm/keycloak_client_crd_test.yaml index 81951ff25beaa194f194bdc2fd0a2de8f3f3a499..af45d2d6f5d10e1ff0688d1d4977ae4b41be5873 100644 --- a/src/test/helm/keycloak_client_crd_test.yaml +++ b/src/test/helm/keycloak_client_crd_test.yaml @@ -27,7 +27,7 @@ release: name: administration namespace: by-helm-test templates: - - templates/keycloak-client-crd.yaml + - templates/keycloak_client_crd.yaml set: ozgcloud: bundesland: by @@ -114,7 +114,7 @@ tests: value: - https://helm-admin.ozg-sh.de - https://helm-admin.ozg-sh.de/* - - it: should override client web origins + - it: should use additional client web origins set: sso: keycloak_clients: @@ -126,6 +126,7 @@ tests: - equal: path: spec.client_web_origins value: + - https://helm-admin.ozg-sh.de - https://some.origin.de - https://some.other.origin.de - it: should use additional redirect uris for client web origins