HELM Kubernetes-具有不同.Values属性的多个子图表

时间:2019-07-18 11:03:15

标签: kubernetes kubernetes-helm

我正在尝试创建带有多个子图表的图表(ibm-db2oltp-dev的2个实例) 有没有一种方法可以在相同的values.yaml文件中为每个实例定义不同的配置。

我需要两个数据库:

db2inst.instname: user1
db2inst.password: password1
options.databaseName: dbname1

db2inst.instname: user2
db2inst.password: password2
options.databaseName: dbname2

我看到可以通过别名来完成,但是我没有找到解释该操作的示例。 有可能吗?

谢谢

1 个答案:

答案 0 :(得分:1)

是的,有可能:

requirements.yaml

dependencies:
  - name: ibm-db2oltp-dev                *(full chart name here)*
    repository: http://localhost:10191   *(Actual repository url here)*
    version: 0.1.0                       *(Required version)*
    alias: db1inst                       *(The name of the chart locally)*
  - name: ibm-db2oltp-dev
    repository: http://localhost:10191
    version: 0.1.0
    alias: db2inst

parentChart/values.yaml:

someParentChartValueX: x
someParentChartValueY: y

db1inst:
  instname: user1
  db2inst: password1

db2inst:
  instname: user2
  db2inst: password2
相关问题