-
Notifications
You must be signed in to change notification settings - Fork 764
/
Tiltfile
120 lines (104 loc) · 3.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
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
# -*- mode: Python -*-
# global settings
settings = {
"allowed_contexts": [
"kind-gatekeeper",
],
}
settings.update(read_json(
"tilt-settings.json",
default={},
))
allow_k8s_contexts(settings.get("allowed_contexts", []))
if settings.get("trigger_mode", "auto").lower() == "manual":
trigger_mode(TRIGGER_MODE_MANUAL)
TILT_DOCKERFILE = """
FROM golang:1.23-bookworm as tilt-helper
# Support live reloading with Tilt
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/60eaa572cdf825c646008e1ea28b635f83cefb38/restart.sh && \
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/60eaa572cdf825c646008e1ea28b635f83cefb38/start.sh && \
chmod +x /start.sh && chmod +x /restart.sh
FROM gcr.io/distroless/base:debug as tilt
WORKDIR /
COPY --from=tilt-helper /start.sh .
COPY --from=tilt-helper /restart.sh .
COPY bin/manager .
"""
# build_manager defines the build process for the manager binary and image.
def build_manager():
cmd = [
"make tilt-prepare",
"GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -a -o .tiltbuild/bin/manager",
]
local_resource(
"manager",
cmd=";".join(cmd),
deps=["pkg", "third_party", "vendor",
"apis", "go.mod", "go.sum", "main.go"],