Configuring third-party Helm charts from my application Helm chart

本秂侑毒 提交于 2020-01-13 06:15:05

问题


I can't seem to find any clear information on this anywhere, but is it possible in a Helm chart to require a third party, such as stable/jenkins, and specify configuration values?

All the examples I see are for running the helm install command directly but I would like to be able to configure it as part of my application.


回答1:


In answer, @desaintmartin referred me to these documents in Slack:

  • Subcharts and Globals
  • Requirements
  • Helm Dependencies

This led me to find the specific part I was looking for, where the parent chart can override sub-charts by specifying the chart name as a key in the parent values.yaml.

In the application chart's requirements.yaml:

dependencies:
- name: jenkins
  # Can be found with "helm search jenkins"
  version: '0.18.0'
  # This is the binaries repository, as documented in the GitHub repo
  repository: 'https://kubernetes-charts.storage.googleapis.com/'

Run:

helm dependency update

In the application chart's values.yaml:

# ...other normal config values

# Name matches the sub-chart
jenkins: 
  # This will be override "someJenkinsConfig" in the "jenkins" sub-chart
  someJenkinsConfig: value 


来源:https://stackoverflow.com/questions/52552876/configuring-third-party-helm-charts-from-my-application-helm-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!