简体   繁体   English

Helm 覆盖父图表中的子图表值

[英]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.

相关问题 Helm Chart Bitnami - Replicaset - 未创建数据库 - Helm Chart Bitnami - Replicaset - Database not being created 副本集设置为true的稳定/ mongodb舵图身份验证问题 - stable/mongodb helm chart authentication issue with replicaset set true MongoDB 在 Kubernetes 中使用 HELM 升级图表版本后引发身份验证错误 - MongoDB throws authentication error after upgrading chart version with HELM in Kubernetes MongoDB 副本集在更新主副本时丢失数据库(Kube.netes + Bitnami Helm Chart) - MongoDB replicaset loses database when updating primary replica (Kubernetes + Bitnami Helm Chart) 非管理员用户的stable / mongodb-replicaset helm chart身份验证错误 - stable/mongodb-replicaset helm chart authentication error for non admin user 通过 Mongodb Helm Chart bitnami 在 openshift 上使用命令运行脚本 readiness-probe.sh 进行准备探测失败 - readiness probe with command running scripts readiness-probe.sh failed on openshift by Mongodb Helm Chart bitnami 在依赖关系图中覆盖 values.yaml - MongoDb - Override values.yaml in a dependency chart - MongoDb Helm:无法从值中设置 mongodb root 密码 - Helm: can't set mongodb root password from the values 如何在 REACT 中从 MongoDB 开发饼图 - How to develop a pie chart from MongoDB in REACT 从子集合中搜索包含来自父子集合的关键字 - search from child collection contains the keyword from parent and child collection
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM