bacongobbler / helm-whatup

A Helm plugin to help users determine if there's an update available for their installed charts.
Other
84 stars 13 forks source link

Work without local repo #20

Open cwrau opened 5 years ago

cwrau commented 5 years ago

Is it possible to check for updates without the need for local repos? We are using Flux's Helm Operator, so we don't need local repos.

It would be awesome if this plugin would check remotely for updates.

stevehipwell commented 5 years ago

@cwrau we're using the Flux Helm operator too and we currently just make sure that we have the relevant repos configured locally and just run helm repo update && helm whatup. If you wanted something more in-cluster and automated you could roll an image to automatically configure helm based on the cluster repos before running helm repo update && helm whatup. You could then get an outdated report triggered by a cron job.

ekeih commented 5 years ago

I wrote a small tool heluxup which maybe does what you want: https://github.com/ekeih/heluxup 🤔

It looks at all HelmRelease objects in you flux repo, downloads the index.yaml files for all used repos, checks for new releases and updates your HelmRelease files. It would be possible to extend heluxup to allow limits based on semver, e.g. "only do patch updates". It would also be possible to make automated git commits and pushes, but I did not implement this yet. If you would like such functionalities, feel free to open issues or pull requests: https://github.com/ekeih/heluxup/issues

stevehipwell commented 5 years ago

@ekeih that looks great!! I think a flag to limit by semver would be a very useful addition.

cwrau commented 5 years ago

That looks great! Perfect for my usecase!

Still, not having to have the same repos configured could be useful for other people.

bacongobbler commented 4 years ago

I'm not sure I fully understand the use case. In either case, you'd have to tell helm whatup how to fetch the repository index to determine if there's an update available. heluxup accomplishes the same task. The only difference is that heluxup reads a file in a given directory with a list of repositories to accomplish the same task.

https://github.com/ekeih/heluxup/blob/f8f605161b810497559b1156c2a68c67f7980ddd/heluxup/main.py#L79-L92

How would you imagine this would work?

ekeih commented 4 years ago

Looking at https://github.com/helm/helm/issues/4256 I don't think there is a way to figure out the source repos of the installed charts. So I think the answer to the original question Is it possible to check for updates without the need for local repos? is No. With heluxup it only works because with the helm-operator there is a way to store the original chart source repo, but with vanilla helm there isn't.