-
Notifications
You must be signed in to change notification settings - Fork 2
/
Tiltfile
24 lines (22 loc) · 1.12 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
SOURCE_IMAGE = os.getenv("SOURCE_IMAGE", default='dev.local/tanzu-java-web-app-source')
LOCAL_PATH = os.getenv("LOCAL_PATH", default='.')
NAMESPACE = os.getenv("NAMESPACE", default='default')
OUTPUT_TO_NULL_COMMAND = os.getenv("OUTPUT_TO_NULL_COMMAND", default=' > /dev/null ')
k8s_custom_deploy(
'tanzu-java-web-app',
apply_cmd="tanzu apps workload apply -f config/workload.yaml --debug --live-update" +
" --local-path " + LOCAL_PATH +
" --source-image " + SOURCE_IMAGE +
" --namespace " + NAMESPACE +
" --yes " +
OUTPUT_TO_NULL_COMMAND +
" && kubectl get workload tanzu-java-web-app --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('tanzu-java-web-app', port_forwards=["8080:8080"],
extra_pod_selectors=[{'serving.knative.dev/service': 'tanzu-java-web-app'}])