-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split k8s_custom_deploy into multiple resources #5944
Comments
one idea i played around with was to do something like:
or you could go even further, and represent it as a series of templates, like the underlying api: https://api.tilt.dev/kubernetes/kubernetes-apply-v1alpha1.html
|
i also am not sure if there's a way to do this without having to encode a lot of the chart internals in the tiltfile, which feels odd |
What if we (users of Tilt) add labels to our resources that would "hint" Tilt to split resources within Tilt? E.g. |
One way to workaround this is to use k8s_attach. So you might have a chart that creates multiple deployments, and you can use
|
Some more context https://kubernetes.slack.com/archives/CESBL84MV/p1692118493208569 If it's ok to have a dependency on |
Made some progress with |
Got this idea semi-working now (though a bit janky) with this workaround: #6349 (comment) The workaround will use
With this feature, addressing the original post, we can handle the shared issues with The only janky part of the workaround at the moment is that it requires you to manually re-trigger the If anyone else has any ideas along similar lines then please do share with us! additional notesTested this using helm_remote for both labels by setting them under kube-prometheus-stack.prometheus-node-exporter.podLabels as helm values and observing the Tilt web UI to see reflected changes.Ideally, would like this to be implemented in Tilt binary itself as natively supported feature. But I can contribute a PR to Tilt extensions after figuring out the janky part and making it tilt friendly. I suspect it will be difficult to detect and hook onto changes to environment variables with the current workaround unless a file is used as a proxy and a reference to some previous environment variable state. This seems like the Tilt way to deal with this. I can add my Prometheus example as a test case to the tilt extension. However, it would be ideal to implement this in base Tilt as it seems like a very sensible feature IMHO. |
Current Behavior
Currently, when you deploy a Helm chart with helm_resource, Tilt tracks it as a single resource. This means:
This means that if your chart has multiple deployments in the chart:
Describe the Feature You Want
A way to represent the chart as multiple resources in the Tilt UI
Additional context
I have mixed feelings about this. We may have to break it up into multiple feature requests. The problem is that a "resource" in tilt aggregates many different things, and breaking them up might get really hairy (e.g., if you break a chart into 2 resources, and restart one, does that mean the other one must restart? If the answer is "no", that breaks Helm chart install semantics. If the answer is "yes", that breaks Tilt restart semantics.)
The text was updated successfully, but these errors were encountered: