简体   繁体   English

何时在 helm upgrade 中使用 --version 选项

[英]When to use --version option in helm upgrade

I'm trying to understand when and how --version option in helm upgrade works.我试图了解helm upgrade中的--version选项何时以及如何工作。 In the docs it says:文档中它说:

--version string Specify the exact chart version to use. --version string 指定要使用的确切图表版本。 If this is not specified, the latest version is used如果未指定,则使用最新版本

Lets say I have installed my app.可以说我已经安装了我的应用程序。

helm install my-app-rls my-app-1.0.0.tgz

Now, If I update my chart and create another package my-app-1.0.1.tgz I can upgrade by现在,如果我更新我的图表并创建另一个包my-app-1.0.1.tgz我可以升级

helm upgrade my-app-rls my-app-1.0.1.tgz

Chart.yaml of my-app-1.0.1.tgz already contains a version. my-app-1.0.1.tgz Chart.yaml包含一个版本。 When does --version need to be used?什么时候需要使用--version What is the use case of it?它的用例是什么?

You use --version when pulling a chart from a chart repository.从图表存储库中提取图表时使用--version For example:例如:

helm upgrade app chart_name \
  --version 1.0.0 \
  --repo https://chart.repo.example.com \
  --install --values ./values.yml

This says to find and use version 1.0.0 found at the url defined by --repo这表示查找和使用在--repo定义的 url 中找到的版本 1.0.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM