-
Notifications
You must be signed in to change notification settings - Fork 2
/
Tiltfile
57 lines (52 loc) · 1.37 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
if 'ENABLE_NGROK_EXTENSION' in os.environ and os.environ['ENABLE_NGROK_EXTENSION'] == '1':
v1alpha1.extension_repo(
name = 'default',
url = 'https://github.com/tilt-dev/tilt-extensions'
)
v1alpha1.extension(name = 'ngrok', repo_name = 'default', repo_path = 'ngrok')
load('ext://min_k8s_version', 'min_k8s_version')
min_k8s_version('1.18.0')
trigger_mode(TRIGGER_MODE_MANUAL)
load('ext://namespace', 'namespace_create')
namespace_create('brigade-dockerhub-gateway')
k8s_resource(
new_name = 'namespace',
objects = ['brigade-dockerhub-gateway:namespace'],
labels = ['brigade-dockerhub-gateway']
)
docker_build(
'brigadecore/brigade-dockerhub-gateway', '.',
only = [
'internal/',
'config.go',
'go.mod',
'go.sum',
'main.go'
],
ignore = ['**/*_test.go']
)
k8s_resource(
workload = 'brigade-dockerhub-gateway',
new_name = 'gateway',
port_forwards = '31700:8080',
labels = ['brigade-dockerhub-gateway']
)
k8s_resource(
workload = 'gateway',
objects = [
'brigade-dockerhub-gateway-config:secret',
'brigade-dockerhub-gateway:secret'
]
)
k8s_yaml(
helm(
'./charts/brigade-dockerhub-gateway',
name = 'brigade-dockerhub-gateway',
namespace = 'brigade-dockerhub-gateway',
set = [
'brigade.apiToken=' + os.environ['BRIGADE_API_TOKEN'],
'tls.enabled=false',
'tokens.dev-token=insecure-dev-token'
]
)
)