forked from eniblock/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTiltfile
More file actions
38 lines (31 loc) · 1.18 KB
/
Copy pathTiltfile
File metadata and controls
38 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
config.define_bool("no-volumes")
cfg = config.parse()
clk_k8s = 'clk --force-color k8s -c ' + k8s_context() + ' '
if config.tilt_subcommand == 'up':
local(clk_k8s + 'add-domain kc.localhost')
local(clk_k8s + 'helm-dependency-update helm/keycloak')
custom_build(
'eniblock/keycloak',
'earthly +docker --ref=$EXPECTED_REF',
['.'],
live_update=[
sync('configurator/', '/tf/'),
sync('theme/', '/opt/keycloak/themes/extra/'),
],
)
k8s_yaml(
helm(
'helm/keycloak',
values=['./helm/keycloak/values-dev.yaml'],
name="keycloak",
)
)
k8s_resource('keycloak', port_forwards=['8080:8080'])
k8s_resource('keycloak-keycloak-db', port_forwards=['5432:5432'])
local_resource('helm lint',
'docker run --rm -t -v $PWD:/app registry.gitlab.com/xdev-tech/build/helm:3.0' +
' lint keycloak helm/keycloak --values helm/keycloak/values-dev.yaml',
'helm/keycloak/', allow_parallel=True)
if config.tilt_subcommand == 'down' and not cfg.get("no-volumes"):
local('kubectl --context ' + k8s_context() + ' delete pvc --selector=app.kubernetes.io/instance=keycloak --wait=false')