[Feature] Have `k8s_custom_deploy` output be the `stdout` of the apply command
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Describe the Feature You Want
Return the stdout from the apply command/bat of k8s_custom_deploy as the function output in Tiltfile.
Current Behavior
The k8s_custom_deploy function returns nothing.
Why Do You Want This?
I was previously using the local(...) + k8s_yaml(...) pattern to run timoni to deploy Kubernetes resources.
This was helpful because I could simultaneously parse out the output of local(...) and group resources the way I like in the Tilt WebUI using k8s_resource.
This however used the timoni build command that generates the YAML manifests (similar to helm template ... command).
timoni also allows us to apply resources in specific orders and with Kubernetes unit testing. This is a significant quality-of-life improvement over helm.
The issue is that if we use timoni to apply resources and use Tilt's k8s_custom_deploy function then we lose the ability to parse the YAML of the applied objects and pass that into k8s_resource function. There was no way that I could find to get the stdout from k8s_custom_deploy apply command.
Having k8s_custom_deploy output the apply command feels like the easiest fix around this problem. But am open to suggestions or workarounds.
Additional context
In case you try to reproduce this with timoni, note that timoni apply does not output YAML manifests as expected by Tilt's k8s_custom_deploy. It has its own console output format. So I used a wrapper script around timoni apply + timoni inspect resources when using in k8s_custom_deploy. This script is shown in https://github.com/stefanprodan/timoni/issues/454
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the k8s_custom_deploy entry point and trace how its apply command is executed and its result is returned to the Tiltfile. Compare the current empty function result with the command's stdout, then verify the output supports the reported Timoni wrapper use case without changing Kubernetes resource behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100