tilt-extensions
tilt-extensions copied to clipboard
helm_remote: remove and pull chart each time
Hello,
I wonder about the installation of each chart. For each helm_remote, the command makes these instructions:
# ======== Perform Installation
local('rm -rf %s' % pull_target)
local(pull_command)
install_crds(chart, chart_target)
So it will download each time the chart and remove the previous. Moreover, in my case i have a uniq chart for several service (called A, B, C for the exemple)
So, the script makes the following
downloading `myChart` and start it for service 'A'
removing `myChart`
downloading `myChart` and start it for service 'B'
removing `myChart`
downloading `myChart` and start it for service 'C'
removing `myChart`
As you can see, step are very useless because of removing and downloading the same chart.
Good points
- Ensure that charts are always up-to-date
Bad points
- Useless expansive operation (dowloading)
- Useless blocking operation before starting tilt watch (Because all downloads have to be finished before start tilt)
What do you think about that ? :)
@Tchoupinax was this resolved with #59 ?
Not really, #59 fixed that all downloaded charts are present in the .helm directory at the end of the Tilt process. :)
An another use case is the offline mode. I thought about it but now I experienced it :p Once Tilt's assets will be accessible offline (#2608), the last problem with offline is this extension which download resources each time.
I wonder if it is a good thing to allow an offline mode. What do you think ?
To make helm_remote working offline, these lines are necessary:
# Command that add the repository to Helm (L. 57)
local(repo_add_command) # updates if already added
# Commands that remove and download the chart
local('rm -rf %s/%s' % (pull_target, chart))
local(pull_command)
These commands can be canceled by environment variable. I do not know enought the Tilt project to know if given flag can be forward to extensions. In this case, we could use a flag when launching tilt up :)
I have some ideas about offline mode, but haven't had a chance to try any of them out, yet. 😞
To add to this issue, the update is also happening when running tilt down which adds an unnecessary delay to stopping the services