-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathTiltfile
More file actions
executable file
·25 lines (23 loc) · 1.11 KB
/
Tiltfile
File metadata and controls
executable file
·25 lines (23 loc) · 1.11 KB
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
allow_k8s_contexts('tap-gke-iterate')
allow_k8s_contexts('tap-iterate')
allow_k8s_contexts('gke_pa-oshopen_europe-west2_tap16')
SOURCE_IMAGE = os.getenv("SOURCE_IMAGE", default='harbor.apps.cf.tanzutime.com/apps/todo-service')
LOCAL_PATH = os.getenv("LOCAL_PATH", default='.')
NAMESPACE = os.getenv("NAMESPACE", default='default')
k8s_custom_deploy(
'todo-service',
apply_cmd="tanzu apps workload apply -f config/workload.yaml --live-update" +
" --local-path " + LOCAL_PATH +
" --source-image " + SOURCE_IMAGE +
" --namespace " + NAMESPACE +
" --yes >/dev/null" +
" && kubectl get workload todo-service --namespace " + NAMESPACE + " -o yaml",
delete_cmd="tanzu apps workload delete -f config/workload.yaml --namespace " + NAMESPACE + " --yes",
deps=['pom.xml', './target/classes'],
container_selector='workload',
live_update=[
sync('./target/classes', '/workspace/BOOT-INF/classes')
]
)
k8s_resource('todo-service', port_forwards=["8080:8080"],
extra_pod_selectors=[{'serving.knative.dev/service': 'todo-service'}])