Skip to content
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

Ability to parse/check Helm chart repository metadata #50

Closed
eriweb opened this issue May 26, 2021 · 5 comments
Closed

Ability to parse/check Helm chart repository metadata #50

eriweb opened this issue May 26, 2021 · 5 comments

Comments

@eriweb
Copy link

eriweb commented May 26, 2021

I've been trying to get version data for Helm charts where there is no apparent git tag or release, this is pretty common for repositories that contain multiple Helm charts.
Example: https://github.com/bitnami/charts/tree/master/bitnami

I see a couple various ways of doing this.

  1. All charts has a Chart.yaml that contains a version, example: https://github.com/bitnami/charts/blob/master/bitnami/apache/Chart.yaml

  2. Most repositories, but not all, produce a repository manifest. Example: https://charts.bitnami.com/bitnami/index.yaml

@dvershinin
Copy link
Owner

I'm not sure about this.

With option 2, the "index file" of sorts for all helms available in the repository, you can query helm versions available by running helm ....

With option 1, how do you envision invoking lastversion ...

All in all, I don't understand what would be a useful use case :-)

@eriweb
Copy link
Author

eriweb commented May 26, 2021

My use case is making a small tool to compare one version, for instance the currently installed, against available version. Preferably without having helm installed.

I've not looked at the lastversion cli all that much, but rather using it as a module I envision using it as lastversion.latest('https://github.com/bitnami/charts/blob/master/bitnami/apache/Chart.yaml')

No problem if this is outside of lastversion usage/scope, I'll always find another way. We use lastversion for some charts that rely on git tagging and would prefer to use one module/method for all charts :-)

lastversion.latest('https://github.com/codecentric/helm-charts/tree/master/charts/keycloak') is an example that works since they use tags

@dvershinin
Copy link
Owner

@terbolous can you check if it behaves as desired, from the master commit of lastversion.

With invocation like lastversion.latest('https://github.com/bitnami/charts/blob/master/bitnami/apache') (on a repository without tags), there's no telling that there's Chart.yaml without trying checking for its existence, which we better avoid.

So for such URLs, you'll have to explicitly specify the type via lastversion.latest('https://github.com/bitnami/charts/blob/master/bitnami/apache', at='helm_chart').

For URLs with Chart.yaml, specifying at is not needed.

@eriweb
Copy link
Author

eriweb commented Jun 7, 2021

LGTM, thanks :)

@dvershinin
Copy link
Owner

Released in v1.3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants