Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ node_modules
*.DS_Store
deployment/helm
deployment/compose
docker-compose.yaml
/docker-compose.yaml
*.egg-info
*.idea
/build
Expand Down
4 changes: 4 additions & 0 deletions applications/accounts/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/dev
.ch-manifest
README.md
/deploy
2 changes: 1 addition & 1 deletion applications/accounts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/keycloak/keycloak:16.1.1
FROM quay.io/keycloak/keycloak:16.1.0

# add kubectl
USER root
Expand Down
12 changes: 11 additions & 1 deletion applications/accounts/deploy/resources/realm.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@
"resetPasswordAllowed": true,
"editUsernameAllowed": true,
"users": [
{{- $j := 0}}
{{- range $app := .Values.apps }}
{{- if (hasKey $app.harness "accounts") }}
{{- if $j}},{{end}}
{{- if len $app.harness.accounts.users}}
{{- $j = add1 $j }}
{{- end }}
{{- range $i, $user := $app.harness.accounts.users }}{{if $i}},{{end}}
{{ include "deploy_accounts_utils.user" (dict "root" $ "app" $app "user" $user) }}
{{- end }}
{{- end }}

{{- end }}
],
"roles": {
Expand Down Expand Up @@ -82,14 +88,18 @@
}
],
"client": {
{{- $k := 0}}
{{- range $app := .Values.apps }}

{{- if (hasKey $app.harness "accounts") }}
{{- if $k}},{{end}}
{{ $app.harness.name | quote }}: [
{{- range $i, $role := $app.harness.accounts.roles }}
{{if $i}},{{end}}
{{ include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
{{- include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
{{- end }}
]
{{- $k = add1 $k }}
{{- end }}
{{- end }}
}
Expand Down
20 changes: 20 additions & 0 deletions applications/accounts/deploy/values-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
accounts:
roles:
- role1
- role2
- role3
users:
- username: sample@testuser.com
clientRoles:
- role1
realmRoles:
- administrator
- offline_access
- username: samples-test-user2
email: sample2@testuser.com
password: test1
clientRoles:
- role1
realmRoles:
- offline_access

2 changes: 1 addition & 1 deletion applications/accounts/deploy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ harness:
cpu: "10m"
limits:
memory: "1024Mi"
cpu: "500m"
cpu: "2000m"
service:
auto: true
port: 8080
Expand Down
5 changes: 5 additions & 0 deletions applications/accounts/dev/disable-theme-cache.cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
embed-server --std-out=echo --server-config=standalone-ha.xml
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheThemes,value=false)
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheTemplates,value=false)
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=staticMaxAge,value=-1)
stop-embedded-server
45 changes: 45 additions & 0 deletions applications/accounts/dev/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: '3.2'

services:
postgres:
image: postgres
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- pg_data:/var/lib/postgresql/data/pgdata

keycloak:
image: quay.io/keycloak/keycloak:16.1.1
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: Pa55w0rd

ports:
- 8080:8080
depends_on:
- postgres
volumes:
- type: bind
source: ../themes/custom
target: /opt/jboss/keycloak/themes/custom
# disable cache
- type: bind
source: ./disable-theme-cache.cli
target: /opt/jboss/startup-scripts/disable-theme-cache.cli
- type: bind
source: ../scripts/create_api_user.sh
target: /opt/jboss/startup-scripts/create_api_user.sh
- type: bind
source: ../plugins/metacell-admin-event-listener-bundle-1.0.0.ear
target: /opt/jboss/keycloak/standalone/deployments/metacell-admin-event-listener-bundle-1.0.0.ear
volumes:
pg_data:
Loading
Loading