From 84a008470399aaf0ea65f038d1f6c6d742d195e5 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Wed, 14 Oct 2020 16:21:40 -0700 Subject: [PATCH] Tilefile watches for changes in ytt templates - When using `local()` in the Tiltfile it will not know to watch those files for changes, so each time we use `local()` we now also use `watch_file()` - As a result, editing a ytt template file now causes an immediate `kubectl apply` of the results --- hack/lib/tilt/Tiltfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hack/lib/tilt/Tiltfile b/hack/lib/tilt/Tiltfile index 4366db38..4f96c775 100644 --- a/hack/lib/tilt/Tiltfile +++ b/hack/lib/tilt/Tiltfile @@ -24,6 +24,8 @@ local_resource( # Render the Dex installation manifest using ytt. k8s_yaml(local(['ytt','--file', '../../../test/deploy/dex'])) +# Tell tilt to watch all of those files for changes. +watch_file('../../../test/deploy/dex') # Collect all the deployed Dex resources under a "dex" resource tab. k8s_resource( @@ -54,6 +56,8 @@ k8s_yaml(local([ '--data-value', 'image_repo=image/local-user-auth', '--data-value', 'image_tag=tilt-dev', ])) +# Tell tilt to watch all of those files for changes. +watch_file('../../../deploy/local-user-authenticator') # Collect all the deployed local-user-authenticator resources under a "local-user-auth" resource tab. k8s_resource( @@ -91,6 +95,8 @@ k8s_yaml(local([ '--data-value-yaml', 'replicas=1', '--data-value-yaml', 'service_nodeport_port=31234', ])) +# Tell tilt to watch all of those files for changes. +watch_file('../../../deploy/supervisor') # Collect all the deployed supervisor resources under a "supervisor" resource tab. k8s_resource( @@ -131,6 +137,8 @@ k8s_yaml(local([ '--data-value discovery_url=$(TERM=dumb kubectl cluster-info | awk \'/Kubernetes master/ {print $NF}\') ' + '--data-value-yaml replicas=1', ])) +# Tell tilt to watch all of those files for changes. +watch_file('../../../deploy/concierge') # Collect all the deployed local-user-authenticator resources under a "concierge" resource tab. k8s_resource(