[英]Helm overriding child chart values from parent chart
I am new to Helm and using Helm 3. I am trying to build a simple helm chart which depends on the mongodb helm chart available from bitnami here .我是 Helm 的新手并使用 Helm 3。我正在尝试构建一个简单的 helm 图表,它依赖于 bitnami here提供的 mongodb helm 图表。
This is the structure of my chart:这是我图表的结构:
mychart
|- charts\
|- mongodb-8.1.1.tgz
|- Chart.yaml
|- values.yaml
I am trying to override the value of mongodb.rootPassword (and some other properties) through the values.yaml file of the parent chart.我试图通过父图表的 values.yaml 文件覆盖mongodb.rootPassword (和一些其他属性)的值。 However, it does not override the value specified and reverts to the default values from the mongodb chart.但是,它不会覆盖指定的值并恢复为 mongodb 图表中的默认值。
It would be a great help to understand what I am doing wrong and how can I override the value of the child chart from the parent chart.了解我做错了什么以及如何从父图表中覆盖子图表的值将很有帮助。
Here are the contents of my files:这是我的文件的内容:
Chart.yaml图.yaml
apiVersion: v2
name: mychart
appVersion: "1.0"
description: mychart has the best description
version: 0.1.0
type: application
dependencies:
- name: mongodb
version: 8.1.1
repository: https://charts.bitnami.com/bitnami
condition: mongodb.enabled
values.yaml值。yaml
mongodb:
global:
namespaceOverride: production
fullnameOverride: mongo-mychart
useStatefulSet: true
auth:
rootPassword: example
persistence:
size: 100Mi
This is possible in case the format of the values.yaml file has an issue.如果 values.yaml 文件的格式有问题,这是可能的。 In this case, the values.yaml file of the parent chart had a few extra encoded characters which were causing it to be ignored by helm and defaulting the child chart's values.在这种情况下,父图表的 values.yaml 文件有一些额外的编码字符,导致 helm 忽略它并默认子图表的值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.