-
Notifications
You must be signed in to change notification settings - Fork 79
/
Tiltfile
47 lines (42 loc) · 1.73 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
load('ext://restart_process', 'docker_build_with_restart')
load('ext://local_output', 'local_output')
load('ext://helm_resource', 'helm_resource')
local_resource('compile smee',
cmd='make cmd/smee/smee-linux-amd64',
deps=["go.mod", "go.sum", "internal", "Dockerfile", "cmd/smee/main.go", "cmd/smee/flag.go", "cmd/smee/backend.go"],
)
docker_build_with_restart(
'quay.io/tinkerbell/smee',
'.',
dockerfile='Dockerfile',
entrypoint=['/usr/bin/smee'],
live_update=[
sync('cmd/smee/smee-linux-amd64', '/usr/bin/smee'),
],
)
default_registry('ttl.sh/meohmy-dghentld')
default_trusted_proxies = local_output("kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}' | tr ' ' ','")
trusted_proxies = os.getenv('TRUSTED_PROXIES', default_trusted_proxies)
lb_ip = os.getenv('LB_IP', '')
stack_version = os.getenv('STACK_CHART_VERSION', '0.5.0')
stack_location = os.getenv('STACK_LOCATION', 'oci://ghcr.io/tinkerbell/charts/stack') # or a local path like '/home/tink/repos/tinkerbell/charts/tinkerbell/stack'
namespace = 'tink'
if lb_ip == '':
fail('Please set the LB_IP environment variable. This is required to deploy the stack.')
# to use a KinD cluster, add a macvlan interface into the KinD docker container. for example: `docker network connect macvlan kind-control-plane`
# Then uncomment the 2 interface lines below.
helm_resource('stack',
chart=stack_location,
namespace=namespace,
image_deps=['quay.io/tinkerbell/smee'],
image_keys=[('smee.image')],
flags=[
'--create-namespace',
'--version=%s' % stack_version,
'--set=global.trustedProxies={%s}' % trusted_proxies,
'--set=global.publicIP=%s' % lb_ip,
#'--set=stack.kubevip.interface=eth1',
#'--set=stack.relay.sourceInterface=eth1',
],
release_name='stack'
)