How to List Helm Chart Versions By Date?

10/25/2018

I'm looking at the helm chart versions from the jupyterhub helm repo: https://jupyterhub.github.io/helm-chart/index.yaml

When I use helm search -l jupyterhub/jupyterhub, the versions come out in the order that they appear in the index.yaml, which is not the order in which they are created (according to the created field in index.yaml)

Is there a way to get the version list sorted by date created?

-- Sam Manzer
kubernetes
kubernetes-helm

1 Answer

10/25/2018

From the helm point of view no. But you can tweak the output to get what you want, although it's pretty tricky since the versioning/tagging hasn't been consistent for jupyterhub/jupyterhub for example.

Anyhow, I came up with this bash/Ruby one-liner but it's picking it up directly from: https://jupyterhub.github.io/helm-chart/index.yaml

$ curl -s https://jupyterhub.github.io/helm-chart/index.yaml | ruby -ryaml -rjson -rdate -e 'puts YAML.load(ARGF)["entries"]["binderhub"].sort_by {|hsh| hsh["created"] }'
-- Rico
Source: StackOverflow