如何按日期列出 Helm Chart 版本?

How to List Helm Chart Versions By Date?

我正在查看来自 jupyterhub helm 存储库的 helm chart 版本:https://jupyterhub.github.io/helm-chart/index.yaml

当我使用 helm search -l jupyterhub/jupyterhub 时,版本按照它们在 index.yaml 中出现的顺序出现,这不是它们的创建顺序(根据 created index.yaml)

中的字段

有没有办法让版本列表按创建日期排序?

从掌舵的角度来看没有。但是您可以调整输出以获得您想要的结果,尽管这非常棘手,因为例如 versioning/tagging 与 jupyterhub/jupyterhub 不一致。

无论如何,我想到了这个 bash/Ruby 单行,但它直接从以下位置获取: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"] }'