-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTiltfile
29 lines (24 loc) · 890 Bytes
/
Tiltfile
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
#!/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':
# declare the host we'll be using locally in k8s dns
local(clk_k8s + 'add-domain ipfs.localhost')
k8s_yaml(
helm(
'helm/ipfs',
values=['./helm/ipfs/values-dev.yaml'],
name='ipfs',
)
)
k8s_resource('ipfs', port_forwards=['5001:5001'])
local_resource('helm lint',
'docker run --rm -t -v $PWD:/app registry.gitlab.com/xdev-tech/build/helm:2.1' +
' lint helm/ipfs --values helm/ipfs/values-dev.yaml',
'helm/ipfs/', 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=ipfs --wait=false'
)