-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile
68 lines (55 loc) · 1.58 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
load('ext://min_k8s_version', 'min_k8s_version')
load('ext://helm_resource', 'helm_resource')
load('ext://namespace', 'namespace_create')
set_team('52cc75cc-c4ed-462f-8ea7-a543d398a381')
version = '0.12.1'
config.define_string_list('allowedContexts')
config.define_string_list('opniChartValues')
config.define_string('defaultRegistry')
config.define_string('valuesPath')
cfg = config.parse()
allow_k8s_contexts(cfg.get('allowedContexts'))
min_k8s_version('1.23')
namespace_create('opni')
update_settings (
max_parallel_updates=1,
k8s_upsert_timeout_secs=300,
)
ignore=[
'**/*.pb.go',
'**/*.pb.*.go',
'**/*.swagger.json',
'pkg/test/mock/*',
'pkg/sdk/crd/*',
'**/zz_generated.*',
'packages/'
]
local_resource('build charts',
deps='packages/**/templates',
cmd='go run ./dagger --charts.git.export',
ignore=ignore,
)
k8s_yaml(helm('./charts/opni-crd/'+version,
name='opni-crd',
namespace='opni',
), allow_duplicates=True)
if cfg.get('valuesPath') != None:
k8s_yaml(helm('./charts/opni/'+version,
name='opni',
namespace='opni',
values=cfg.get('valuesPath')
), allow_duplicates=True)
else:
k8s_yaml(helm('./charts/opni/'+version,
name='opni',
namespace='opni',
set=cfg.get('opniChartValues')
), allow_duplicates=True)
if cfg.get('defaultRegistry') != None:
default_registry(cfg.get('defaultRegistry'))
custom_build("rancher/opni",
command="go run ./dagger --images.opni.push --images.opni.repo=${EXPECTED_IMAGE} --images.opni.tag=${EXPECTED_TAG}",
deps=['controllers', 'apis', 'pkg', 'plugins'],
ignore=ignore,
skips_local_docker=True,
)