Skip to content

Commit c882f43

Browse files
authored
Merge pull request #794 from MetaCell/feature/CH-169
Optional image building -- fix test build
2 parents 21b19bd + 14af0b6 commit c882f43

21 files changed

Lines changed: 1184 additions & 103 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ node_modules
88
*.DS_Store
99
deployment/helm
1010
deployment/compose
11-
docker-compose.yaml
11+
/docker-compose.yaml
1212
*.egg-info
1313
*.idea
1414
/build
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/dev
2+
.ch-manifest
3+
README.md
4+
/deploy

applications/accounts/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/keycloak/keycloak:16.1.1
1+
FROM quay.io/keycloak/keycloak:16.1.0
22

33
# add kubectl
44
USER root

applications/accounts/deploy/resources/realm.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,18 @@
4444
"resetPasswordAllowed": true,
4545
"editUsernameAllowed": true,
4646
"users": [
47+
{{- $j := 0}}
4748
{{- range $app := .Values.apps }}
4849
{{- if (hasKey $app.harness "accounts") }}
50+
{{- if $j}},{{end}}
51+
{{- if len $app.harness.accounts.users}}
52+
{{- $j = add1 $j }}
53+
{{- end }}
4954
{{- range $i, $user := $app.harness.accounts.users }}{{if $i}},{{end}}
5055
{{ include "deploy_accounts_utils.user" (dict "root" $ "app" $app "user" $user) }}
5156
{{- end }}
5257
{{- end }}
58+
5359
{{- end }}
5460
],
5561
"roles": {
@@ -82,14 +88,18 @@
8288
}
8389
],
8490
"client": {
91+
{{- $k := 0}}
8592
{{- range $app := .Values.apps }}
93+
8694
{{- if (hasKey $app.harness "accounts") }}
95+
{{- if $k}},{{end}}
8796
{{ $app.harness.name | quote }}: [
8897
{{- range $i, $role := $app.harness.accounts.roles }}
8998
{{if $i}},{{end}}
90-
{{ include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
99+
{{- include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
91100
{{- end }}
92101
]
102+
{{- $k = add1 $k }}
93103
{{- end }}
94104
{{- end }}
95105
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
accounts:
2+
roles:
3+
- role1
4+
- role2
5+
- role3
6+
users:
7+
- username: sample@testuser.com
8+
clientRoles:
9+
- role1
10+
realmRoles:
11+
- administrator
12+
- offline_access
13+
- username: samples-test-user2
14+
email: sample2@testuser.com
15+
password: test1
16+
clientRoles:
17+
- role1
18+
realmRoles:
19+
- offline_access
20+

applications/accounts/deploy/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ harness:
1111
cpu: "10m"
1212
limits:
1313
memory: "1024Mi"
14-
cpu: "500m"
14+
cpu: "2000m"
1515
service:
1616
auto: true
1717
port: 8080
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
embed-server --std-out=echo --server-config=standalone-ha.xml
2+
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheThemes,value=false)
3+
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheTemplates,value=false)
4+
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=staticMaxAge,value=-1)
5+
stop-embedded-server
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: '3.2'
2+
3+
services:
4+
postgres:
5+
image: postgres
6+
environment:
7+
POSTGRES_DB: keycloak
8+
POSTGRES_USER: keycloak
9+
POSTGRES_PASSWORD: password
10+
PGDATA: /var/lib/postgresql/data/pgdata
11+
volumes:
12+
- pg_data:/var/lib/postgresql/data/pgdata
13+
14+
keycloak:
15+
image: quay.io/keycloak/keycloak:16.1.1
16+
environment:
17+
DB_VENDOR: POSTGRES
18+
DB_ADDR: postgres
19+
DB_DATABASE: keycloak
20+
DB_USER: keycloak
21+
DB_SCHEMA: public
22+
DB_PASSWORD: password
23+
KEYCLOAK_USER: admin
24+
KEYCLOAK_PASSWORD: Pa55w0rd
25+
26+
ports:
27+
- 8080:8080
28+
depends_on:
29+
- postgres
30+
volumes:
31+
- type: bind
32+
source: ../themes/custom
33+
target: /opt/jboss/keycloak/themes/custom
34+
# disable cache
35+
- type: bind
36+
source: ./disable-theme-cache.cli
37+
target: /opt/jboss/startup-scripts/disable-theme-cache.cli
38+
- type: bind
39+
source: ../scripts/create_api_user.sh
40+
target: /opt/jboss/startup-scripts/create_api_user.sh
41+
- type: bind
42+
source: ../plugins/metacell-admin-event-listener-bundle-1.0.0.ear
43+
target: /opt/jboss/keycloak/standalone/deployments/metacell-admin-event-listener-bundle-1.0.0.ear
44+
volumes:
45+
pg_data:

0 commit comments

Comments
 (0)