From c1d98b0b4871ac8c6edb84639c1c256e8c9ad855 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Thu, 21 Mar 2024 11:33:30 +0100 Subject: [PATCH] OZG-5238 Fix keycloak client refernece --- src/main/helm/templates/_helpers.tpl | 6 +++--- src/test/helm/deployment_defaults_sso_test.yaml | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/helm/templates/_helpers.tpl b/src/main/helm/templates/_helpers.tpl index e6d9c8ad..ffc0931f 100644 --- a/src/main/helm/templates/_helpers.tpl +++ b/src/main/helm/templates/_helpers.tpl @@ -60,10 +60,10 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} {{- end -}} {{- define "app.ssoClientName" -}} -{{- if (.Values.sso).client_name -}} -{{ printf "%s" (.Values.sso).client_name }} +{{- if (.Values.sso.keycloak_clients[0]).client_name -}} +{{ printf "%s" (.Values.sso.keycloak_clients[0]).client_name }} {{- else -}} -{{ printf "administration" }} +{{ printf "admin" }} {{- end -}} {{- end -}} diff --git a/src/test/helm/deployment_defaults_sso_test.yaml b/src/test/helm/deployment_defaults_sso_test.yaml index 70a0cac2..003c2a53 100644 --- a/src/test/helm/deployment_defaults_sso_test.yaml +++ b/src/test/helm/deployment_defaults_sso_test.yaml @@ -50,7 +50,7 @@ tests: path: spec.template.spec.containers[0].env content: name: ozgcloud_oauth2_resource - value: administration + value: admin - contains: path: spec.template.spec.containers[0].env content: @@ -77,7 +77,9 @@ tests: - it: check different client name set: sso: - client_name: different-client + keycloak_clients: + - client_name: different-client + client_roles: [] serverUrl: https://sso.company.local asserts: - isKind: -- GitLab