-
Notifications
You must be signed in to change notification settings - Fork 5
/
Tiltfile
73 lines (64 loc) · 1.82 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- mode: Python -*-
# For more on Extensions, see: https://docs.tilt.dev/extensions.html
load('ext://restart_process', 'docker_build_with_restart')
load('ext://local_output', 'local_output')
default_registry('ghcr.io/vasu1124')
allow_k8s_contexts(['colima', 'Default'])
compile_cmd = 'make introspect-linux'
# print(compile_cmd)
local_resource(
'introspect-compile',
compile_cmd,
deps=['./cmd', './pkg', './vendor'],
labels=['introspect']
)
docker_build_with_restart(
'ghcr.io/vasu1124/introspect',
'.',
entrypoint=['/introspect-linux'],
dockerfile='docker/Dockerfile.alpine',
only=[
'./introspect-linux',
'./css',
'./tmpl',
],
live_update=[
sync('./css', '/css'),
sync('./tmpl', '/tmpl'),
],
)
k8s_yaml(kustomize('./kubernetes/all-in-one'))
k8s_resource(
'introspect',
port_forwards=[9090],
resource_deps=['introspect-compile'],
labels=['introspect']
)
k8s_resource(workload='introspect', objects=[
'introspect-config:configmap',
'introspect-tls:secret',
'introspect-validationwebook:validatingwebhookconfiguration',
'uselessmachines.introspect.actvirtual.com:customresourcedefinition',
'introspect-election-role:Role',
'introspect-election-rolebinding:RoleBinding',
'uselessmachine-editor-role:clusterrole',
'uselessmachine-viewer-role:clusterrole',
'introspect-rolebinding:clusterrolebinding',
'introspect-secret:secret',],
labels=['introspect']
)
k8s_resource(workload='mongodb', objects=[
'mongodb:persistentvolumeclaim',
'mongodb-secret:secret'],
labels=['introspect']
)
#k8s_resource(workload='etcd', objects=[
# 'etcd:secret'],
# labels=['introspect']
#)
#v1alpha1.extension_repo(name='tilt-extensions', url='https://github.com/tilt-dev/tilt-extensions')
#v1alpha1.extension(
# name='ngrok',
# repo_name='tilt-extensions',
# repo_path='ngrok',
#)