forked from akuity/kargo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile
132 lines (122 loc) · 2.95 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
trigger_mode(TRIGGER_MODE_MANUAL)
allow_k8s_contexts('orbstack')
load('ext://namespace', 'namespace_create')
namespace_create('kargo')
k8s_resource(
new_name = 'namespace',
objects = ['kargo:namespace'],
labels = ['kargo']
)
docker_build(
'ghcr.io/akuity/kargo',
'.',
only = [
'api/',
'cmd/',
'internal/',
'pkg/',
'ui',
'go.mod',
'go.sum'
],
ignore = ['**/*_test.go'],
build_args = {
'GIT_COMMIT': local('git rev-parse HEAD'),
'GIT_TREE_STATE': local('if [ -z "`git status --porcelain`" ]; then echo "clean" ; else echo "dirty"; fi')
}
)
k8s_resource(
new_name = 'common',
labels = ['kargo'],
objects = [
'kargo-admin:clusterrole',
'kargo-developer:clusterrole',
'kargo-promoter:clusterrole',
'kargo-selfsigned-cert-issuer:issuer'
]
)
k8s_resource(
workload = 'kargo-api',
new_name = 'api',
port_forwards = [
'30081:8080'
],
labels = ['kargo'],
objects = [
'kargo-api:certificate',
'kargo-api:clusterrole',
'kargo-api:clusterrolebinding',
'kargo-api:configmap',
'kargo-api:secret',
'kargo-api:serviceaccount'
]
)
k8s_resource(
workload = 'kargo-controller',
new_name = 'controller',
labels = ['kargo'],
objects = [
'kargo-controller:clusterrole',
'kargo-controller:clusterrolebinding',
'kargo-controller:configmap',
'kargo-controller:role',
'kargo-controller:rolebinding',
'kargo-controller:serviceaccount',
'kargo-controller-argocd:clusterrole',
'kargo-controller-argocd:clusterrolebinding'
]
)
k8s_resource(
workload = 'kargo-dex-server',
new_name = 'dex-server',
labels = ['kargo'],
objects = [
'kargo-dex-server:certificate',
'kargo-dex-server:secret',
'kargo-dex-server:serviceaccount'
]
)
k8s_resource(
workload = 'kargo-garbage-collector',
new_name = 'garbage-collector',
labels = ['kargo'],
objects = [
'kargo-garbage-collector:clusterrole',
'kargo-garbage-collector:clusterrolebinding',
'kargo-garbage-collector:configmap',
'kargo-garbage-collector:serviceaccount'
]
)
k8s_resource(
workload = 'kargo-webhooks-server',
new_name = 'webhooks-server',
labels = ['kargo'],
objects = [
'kargo:mutatingwebhookconfiguration',
'kargo:validatingwebhookconfiguration',
'kargo-webhooks-server:certificate',
'kargo-webhooks-server:clusterrole',
'kargo-webhooks-server:clusterrolebinding',
'kargo-webhooks-server:configmap',
'kargo-webhooks-server:serviceaccount',
'kargo-webhooks-server-ns-controller:clusterrole',
'kargo-webhooks-server-ns-controller:clusterrolebinding'
]
)
k8s_resource(
new_name = 'crds',
objects = [
'stages.kargo.akuity.io:customresourcedefinition',
'promotionpolicies.kargo.akuity.io:customresourcedefinition',
'promotions.kargo.akuity.io:customresourcedefinition'
],
labels = ['kargo']
)
k8s_yaml(
helm(
'./charts/kargo',
name = 'kargo',
namespace = 'kargo',
values = 'values.dev.yaml'
)
)