简体   繁体   English

掌舵 Chart.yaml 和 values.yaml

[英]helm Chart.yaml and values.yaml

I am starting to get my arms around using Kubernetes and Helm.我开始使用 Kubernetes 和 Helm。 Most of it makes perfect sense to me.其中大部分对我来说都很有意义。 I am missing one thing though and maybe someone can answer me.我错过了一件事,也许有人可以回答我。 Why is there a separate Chart.yaml and values.yaml file?为什么会有单独的 Chart.yaml 和 values.yaml 文件? it seems to me that it would make better sense on a helm install command to have one file with a standard name.在我看来,在 helm install 命令上有一个具有标准名称的文件会更有意义。 Asking for some DevOps wisdom.寻求一些 DevOps 智慧。

Chart.yaml contains metadata about the chart itself: its name, the chart version, a description, and similar details. Chart.yaml包含有关图表本身的元数据:其名称、图表版本、描述和类似的详细信息。 In Helm 3 it can contain dependencies as well.在 Helm 3 中,它也可以包含依赖项。

values.yaml contains configuration settings for the chart. values.yaml包含图表的配置设置。 This typically includes things like the image repository to pull from, where you want data to be stored, and how to make the service accessible.这通常包括诸如要从中提取的图像存储库、您希望存储数据的位置以及如何使服务可访问等内容。

When you install the chart, you can use helm install -f to supply an additional YAML file of configuration options that override things in value.yaml , or helm install --set to set a single specific value.安装图表时,您可以使用helm install -f提供额外的 YAML 配置选项文件,这些文件覆盖value.yaml中的内容,或helm install --set设置单个特定值。 You can't override things in the Chart.yaml .您不能覆盖Chart.yaml中的内容。

In the template code, items in Chart.yaml and values.yaml are available in the top-level data items .Chart and .Values , respectively.在模板代码中, Chart.yamlvalues.yaml中的项分别在顶级数据项.Chart.Values中可用。

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

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