问题描述
我想使用 postgresql图表作为我的要求舵图.
I want to use the postgresql chart as a requirements for my Helm chart.
我的requirements.yaml
文件如下所示:
dependencies:
- name: "postgresql"
version: "3.10.0"
repository: "@stable"
在postgreSQL Helm图表中,我现在想使用属性postgresqlUsername
设置用户名(请参见所有属性的https://github.com/helm/charts/tree/master/stable/postgresql .
In the postgreSQL Helm chart I now want to set the username with the property postgresqlUsername
(see https://github.com/helm/charts/tree/master/stable/postgresql for all properties).
我必须在项目中的哪里指定此属性,以便将其传播到postgreSQL依赖项?
Where do I have to specify this property in my project so that it gets propagated to the postgreSQL dependency?
推荐答案
如 https://v2.helm.sh/docs/chart_template_guide/#subcharts-and-global-values ,在父级(即不是依赖项)图表的values.yaml
文件中,有一个部分包含
As described in https://v2.helm.sh/docs/chart_template_guide/#subcharts-and-global-values, in your parent (i.e. not the dependency) chart's values.yaml
file, have a section that contains
postgresql:
postgresUsername: ....
postgresPassword: ....
...
也就是说,postgresql
键下的所有值都将覆盖子(postgresql
)图表的values.yaml
值.请注意,如果在requirements.yaml
中将postgresql
依赖关系图别名为另一个名称,则应使用该其他名称代替postgresql
.
That is, all values under the postgresql
key will override the child (postgresql
) chart's values.yaml
values. Note that if you have aliased the postgresql
dependency chart to another name in your requirements.yaml
, you should use that other name instead of postgresql
.
v3中的相应文章在此处 https://helm.sh/docs/chart_template_guide /subcharts_and_globals/
edit: The corresponding article in v3 is here https://helm.sh/docs/chart_template_guide/subcharts_and_globals/
这篇关于根据Helm图表设置值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!