-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTiltfile
78 lines (66 loc) · 1.7 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
load("ext://helm_resource", "helm_repo", "helm_resource")
load("ext://restart_process", "docker_build_with_restart")
load("ext://namespace", "namespace_create")
# Set default trigger mode to manual
trigger_mode(TRIGGER_MODE_MANUAL)
# Disable analytics
analytics_settings(False)
# Disable secrets scrubbing
secret_settings(disable_scrub=True)
# Allow only gangplank k8s context
allow_k8s_contexts("kind-gangplank")
# Create the namespaces
namespace_create("gangplank")
namespace_create("dex")
k8s_resource(
new_name="namespaces",
objects=["gangplank:namespace","dex:namespace"],
)
helm_repo(
name="dex",
url="https://charts.dexidp.io",
resource_name="dex-repo",
)
helm_resource(
name="dex",
chart="dex/dex",
release_name="dex",
namespace="dex",
flags=["--values", "./configs/helm-values/dex.yaml", "--version=0.16.0"],
deps=["namespaces", "dex-repo"],
)
k8s_resource(
workload="dex",
port_forwards=["5556:5556"],
)
helm_resource(
name="gangplank",
chart="./deployments/helm",
release_name="gangplank",
image_deps=["gangplank"],
image_keys=[
("image.repository", "image.tag"),
],
namespace="gangplank",
deps=["namespaces"],
flags=['--values', "./configs/helm-values/gangplank.yaml"],
)
docker_build_with_restart(
ref="gangplank",
context=".",
dockerfile="Dockerfile-dev",
live_update=[
sync("./cmd", "/src/cmd"),
sync("./internal", "/src/internal"),
sync("./static", "/src/static"),
sync("./templates", "/src/templates"),
sync("./go.mod", "/src/go.mod"),
sync("./go.sum", "/src/go.sum"),
],
entrypoint=["go", "run", "./cmd/gangplank"],
)
k8s_resource(
workload="gangplank",
port_forwards=["8080:8080"],
trigger_mode=TRIGGER_MODE_AUTO
)