Skip to content

Commit 14af0b6

Browse files
committed
CH-169 try fix keycloak starting issue
1 parent ec5b8c1 commit 14af0b6

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

applications/accounts/deploy/resources/realm.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@
4747
{{- $j := 0}}
4848
{{- range $app := .Values.apps }}
4949
{{- if (hasKey $app.harness "accounts") }}
50-
{{- range $i, $user := $app.harness.accounts.users }}{{if or $i $j}},{{end}}
50+
{{- if $j}},{{end}}
51+
{{- if len $app.harness.accounts.users}}
52+
{{- $j = add1 $j }}
53+
{{- end }}
54+
{{- range $i, $user := $app.harness.accounts.users }}{{if $i}},{{end}}
5155
{{ include "deploy_accounts_utils.user" (dict "root" $ "app" $app "user" $user) }}
5256
{{- end }}
5357
{{- end }}
54-
{{- $j := add1 $j }}
58+
5559
{{- end }}
5660
],
5761
"roles": {
@@ -86,12 +90,13 @@
8690
"client": {
8791
{{- $k := 0}}
8892
{{- range $app := .Values.apps }}
93+
8994
{{- if (hasKey $app.harness "accounts") }}
90-
95+
{{- if $k}},{{end}}
9196
{{ $app.harness.name | quote }}: [
9297
{{- range $i, $role := $app.harness.accounts.roles }}
93-
{{if or $i $k}},{{end}}
94-
{{ include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
98+
{{if $i}},{{end}}
99+
{{- include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
95100
{{- end }}
96101
]
97102
{{- $k = add1 $k }}

0 commit comments

Comments
 (0)