Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
覆盖依赖关系图中的values.yaml-MongoDb_Mongodb_Kubernetes - Fatal编程技术网

覆盖依赖关系图中的values.yaml-MongoDb

覆盖依赖关系图中的values.yaml-MongoDb,mongodb,kubernetes,Mongodb,Kubernetes,我有一个requirements.yaml文件: dependencies: - name: mongodb-replicaset # Can be found with "helm search <chart>" version: 3.13.0 # This is the binaries repository, as documented in the GitHub repo repository: https://kubernetes-cha

我有一个requirements.yaml文件:

dependencies:
  - name: mongodb-replicaset
    # Can be found with "helm search <chart>"
    version: 3.13.0
    # This is the binaries repository, as documented in the GitHub repo
    repository: https://kubernetes-charts.storage.googleapis.com/


如何在依赖关系图中初始化时重写values.yaml文件?

将值放在与上游图表名称匹配的键下,以便

mongodb-replicaset:
  auth:
    enabled: true
    etc etc

将值放在与上游图表名称匹配的键下,以便

mongodb-replicaset:
  auth:
    enabled: true
    etc etc

我想说,工作流可以是下一步:

1) 使用本地下载所有内容-当helm dependency update检索图表时,它会将它们作为图表档案存储在charts/目录中

官方文件中的示例

$ helm dep up foochart
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "local" chart repository
...Successfully got an update from the "stable" chart repository
...Successfully got an update from the "example" chart repository
...Successfully got an update from the "another" chart repository
Update Complete.
Saving 2 charts
Downloading apache from repo http://example.com/charts
Downloading mysql from repo http://another.example.com/charts
2) 按照@coderanger的建议,在mongodb复制集图表下更改values.yaml

3) 使用本地向下倾斜的| \修改文件部署舵图

另一个选项是检查is:parent values.yaml charts配置文件。 根据:

-子图表被认为是“独立的”,这意味着子图表永远不能明确依赖于其父图表

-因此,子图表无法访问其父图表的值

-父图表可以覆盖子图表的值

-Helm有一个全局值的概念,所有图表都可以访问该概念

请查看文档的“覆盖父图表中的值”部分-其中有一个如何使用全局图表覆盖子图表值的示例


希望它能有所帮助

我想说工作流是下一步:

1) 使用本地下载所有内容-当helm dependency update检索图表时,它会将它们作为图表档案存储在charts/目录中

官方文件中的示例

$ helm dep up foochart
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "local" chart repository
...Successfully got an update from the "stable" chart repository
...Successfully got an update from the "example" chart repository
...Successfully got an update from the "another" chart repository
Update Complete.
Saving 2 charts
Downloading apache from repo http://example.com/charts
Downloading mysql from repo http://another.example.com/charts
2) 按照@coderanger的建议,在mongodb复制集图表下更改values.yaml

3) 使用本地向下倾斜的| \修改文件部署舵图

另一个选项是检查is:parent values.yaml charts配置文件。 根据:

-子图表被认为是“独立的”,这意味着子图表永远不能明确依赖于其父图表

-因此,子图表无法访问其父图表的值

-父图表可以覆盖子图表的值

-Helm有一个全局值的概念,所有图表都可以访问该概念

请查看文档的“覆盖父图表中的值”部分-其中有一个如何使用全局图表覆盖子图表值的示例


希望能有所帮助

我是新来掌舵的,我应该把这些价值观放在哪里?在我自己的values.yaml文件中?另外,如何避免将用户名和密码写入文件?通常,您会将静态、非机密部分放入伞形图的values.yml中。秘密值将在运行时使用
-f
命令行标志传递,但是使用Helm管理秘密值是非常棘手的,您应该阅读可以提供帮助的分支和插件。就我个人而言,我不推荐它,这是我不推荐Helm的(许多)原因之一。我是Helm的新手,我应该把这些价值观放在哪里?在我自己的values.yaml文件中?另外,如何避免将用户名和密码写入文件?通常,您会将静态、非机密部分放入伞形图的values.yml中。秘密值将在运行时使用
-f
命令行标志传递,但是使用Helm管理秘密值是非常棘手的,您应该阅读可以提供帮助的分支和插件。就我个人而言,我不推荐它,这是我不推荐Helm的(许多)原因之一。