-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tiltfile
58 lines (52 loc) · 1.39 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
58
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-cloudevents-gateway')
k8s_resource(
new_name = 'namespace',
objects = ['brigade-cloudevents-gateway:namespace'],
labels = ['brigade-cloudevents-gateway']
)
docker_build(
'brigadecore/brigade-cloudevents-gateway', '.',
only = [
'internal/',
'config.go',
'go.mod',
'go.sum',
'main.go'
],
ignore = ['**/*_test.go']
)
k8s_resource(
workload = 'brigade-cloudevents-gateway',
new_name = 'gateway',
port_forwards = '31700:8080',
labels = ['brigade-cloudevents-gateway']
)
k8s_resource(
workload = 'gateway',
objects = [
'brigade-cloudevents-gateway-config:secret',
'brigade-cloudevents-gateway:secret'
]
)
k8s_yaml(
helm(
'./charts/brigade-cloudevents-gateway',
name = 'brigade-cloudevents-gateway',
namespace = 'brigade-cloudevents-gateway',
set = [
'brigade.apiToken=' + os.environ['BRIGADE_API_TOKEN'],
'tls.enabled=false',
'tokens.dev-token=insecure-dev-token'
]
)
)