[Feature] Have k8s_custom_deploy
output be the stdout
of the apply command
#6477
Labels
enhancement
New feature or request
Describe the Feature You Want
Return the
stdout
from the apply command/bat ofk8s_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 runtimoni
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 usingk8s_resource
.This however used the
timoni build
command that generates the YAML manifests (similar tohelm 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 overhelm
.The issue is that if we use
timoni
to apply resources and use Tilt'sk8s_custom_deploy
function then we lose the ability to parse the YAML of the applied objects and pass that intok8s_resource
function. There was no way that I could find to get thestdout
fromk8s_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 thattimoni apply
does not output YAML manifests as expected by Tilt'sk8s_custom_deploy
. It has its own console output format. So I used a wrapper script aroundtimoni apply
+timoni inspect resources
when using ink8s_custom_deploy
. This script is shown in stefanprodan/timoni#454The text was updated successfully, but these errors were encountered: