forked from kubernetes/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile
74 lines (61 loc) · 2.11 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
# -*- mode: Python -*-
envsubst_cmd = "envsubst"
kubectl_cmd = "kubectl"
# Load extensions
load("ext://restart_process", "docker_build_with_restart")
load("ext://cert_manager", "deploy_cert_manager")
load('ext://helm_remote', 'helm_remote')
def kubernetes_dashboard():
local_resource(
'build-api',
cmd = 'cd modules/api;make build',
deps = ['modules/api/main.go', 'modules/api/pkg']
)
local_resource(
'build-web',
cmd = 'cd modules/web;make build',
deps = ['modules/web/main.go', 'modules/web/pkg', 'modules/web/src', 'modules/web/i18n']
)
docker_build(
'dashboard-api',
context = '.',
entrypoint = ["/dashboard-api", "--insecure-bind-address=0.0.0.0", "--bind-address=0.0.0.0"],
dockerfile = './modules/api/Dockerfile',
only = ['./.dist/api'],
live_update = [
sync('.dist/api/linux/amd64/dashboard-api', '/dashboard-api')
]
)
docker_build(
'dashboard-web',
context = '.',
entrypoint = ["/dashboard-web", "--insecure-bind-address=0.0.0.0", "--bind-address=0.0.0.0"],
dockerfile = './modules/web/Dockerfile',
only = ['./.dist/web'],
live_update = [
sync('.dist/web/linux/amd64/dashboard-api', '/dashboard-web')
],
ignore = ['./modules/web/angular']
)
##############################
# Actual work happens here
##############################
# Deploy Ingress Nginx
helm_remote('ingress-nginx',
version="4.6.1",
repo_name='ingress-nginx',
namespace='ingress-nginx',
create_namespace='true',
set=['controller.admissionWebhooks.enabled=false'],
repo_url='https://kubernetes.github.io/ingress-nginx')
# Deploy Metrics Server
helm_remote('metrics-server',
version="3.10.0",
repo_name='metrics-server',
namespace='metrics-server',
create_namespace='true',
set=["args={--kubelet-preferred-address-types=InternalIP,--kubelet-insecure-tls=true}"],
repo_url='https://kubernetes-sigs.github.io/metrics-server/')
deploy_cert_manager()
kubernetes_dashboard()
k8s_yaml('./charts/kubernetes-dashboard.yaml')