Tiltfile Resource Assembly Migration
Tilt changed how it combines k8s objects and images into Tilt resources. The new behavior is to simply make one Tilt resource per k8s object that has at least one container.
The TL;DR is:
- Your tilt resources’ names may have changed.
- You might need to change how you’re calling
- If you were using
k8s_resource_assembly_versionto revert to the old way that assembly worked, you will have to remove that as Tilt is removing the old assembly functionality.
k8s_resource behavior was kind of weird: sometimes you could just use
the image name, and sometimes you’d pass the yaml, and sometimes you’d pass the
image. Sometimes it was used for creating a resource, and sometimes it was used
for configuring an existing resource.
k8s_resource’s ‘yaml’ and ‘image’ parameters. It’s now a
function for configuring a workload’s resource. (See the API docs for the new
Migrating to the new behavior should mostly be a matter of:
- Remove any ‘yaml’ or ‘image’ args to
- and make sure any removed ‘yaml’ args from (2) are passed to
k8s_yamlsomewhere else in your Tiltfile.
- If your
k8s_resourcecalls say unknown resource (because Tilt now names by k8s object instead of image), either change the first arg to
k8s_resourceto match the new name, or use
workload_to_resource_functionto change the naming rules.
- Let any teammates know that they need to upgrade Tilt.
Please don’t hesitate to reach out if you run into any problems or confusion!