【问题标题】:How to List Helm Chart Versions By Date?如何按日期列出 Helm Chart 版本?
【发布时间】:2019-03-30 06:24:41
【问题描述】:

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

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

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

【问题讨论】:

    标签: kubernetes kubernetes-helm


    【解决方案1】:

    从掌舵的角度来看没有。但是您可以调整输出以获得您想要的内容,尽管这非常棘手,因为例如 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"] }'
    

    【讨论】:

      猜你喜欢
      • 2020-10-27
      • 1970-01-01
      • 2018-12-04
      • 1970-01-01
      • 1970-01-01
      • 2021-02-12
      • 1970-01-01
      • 2023-04-11
      • 2022-08-18
      相关资源
      最近更新 更多