Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
administration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
administration
Commits
3b134574
Commit
3b134574
authored
1 year ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-5238 Correctly construct sso client
parent
37a25762
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/helm/templates/_helpers.tpl
+11
-3
11 additions, 3 deletions
src/main/helm/templates/_helpers.tpl
src/test/helm/deployment_defaults_sso_test.yaml
+16
-1
16 additions, 1 deletion
src/test/helm/deployment_defaults_sso_test.yaml
with
27 additions
and
4 deletions
src/main/helm/templates/_helpers.tpl
+
11
−
3
View file @
3b134574
...
...
@@ -60,13 +60,21 @@ 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 -}}
{{- if (first .Values.sso.keycloak_clients).client_name -}}
{{ printf "%s" (first .Values.sso.keycloak_clients).client_name }}
{{- else -}}
{{ printf "admin" }}
{{ include "app.defaultSsoClientName" . }}
{{- end -}}
{{- else -}}
{{ include "app.defaultSsoClientName" . }}
{{- end -}}
{{- end -}}
{{- define "app.defaultSsoClientName" -}}
{{ printf "admin" }}
{{- end -}}
{{- define "app.ssoServerUrl" -}}
{{- required "sso.serverUrl muss angegeben sein" (.Values.sso).serverUrl -}}
{{- end -}}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/test/helm/deployment_defaults_sso_test.yaml
+
16
−
1
View file @
3b134574
...
...
@@ -75,7 +75,8 @@ tests:
-
it
:
check different client name
set
:
sso
:
client_name
:
different-client
keycloak_clients
:
-
client_name
:
different-client
asserts
:
-
isKind
:
of
:
Deployment
...
...
@@ -84,3 +85,17 @@ tests:
content
:
name
:
ozgcloud_oauth2_resource
value
:
different-client
-
it
:
should have default client name
set
:
sso
:
keycloak_clients
:
-
client_name_typo
:
different-client
asserts
:
-
isKind
:
of
:
Deployment
-
contains
:
path
:
spec.template.spec.containers[0].env
content
:
name
:
ozgcloud_oauth2_resource
value
:
admin
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment