Sunil Gajula
Sunil Gajula

Reputation: 1223

Override values of Subcharts inHelm

We have created common helm charts. Using the common charts, we have derived HelloWorld helm chart

Charts
  Common
    templates
      > _deployment.yaml
      > _configmap.yaml
      > _service.yaml
    Chart.yaml

  HelloWorld
    templates
      > deployment.yaml 
      > configmap.yaml
      > service.yaml
    Chart.yaml
    values.yaml 
    values-dev.yaml 

We wanted to override values specified values.yaml (subchart) using values-dev.yaml , We understand we can override the values from the subchart. The values can be overrided.

However, we wanted to override the values for chart level instead of app level. Below is the structure.

Charts
  Common
    templates
      > _deployment.yaml
      > _configmap.yaml
      > _service.yaml
    Chart.yaml

  HelloWorld1
    templates
      > deployment.yaml 
      > configmap.yaml
      > service.yaml
    Chart.yaml
    values-HelloWorld1.yaml 
    values-dev.yaml 

    HelloWorld2
      templates
        > deployment.yaml   
        > configmap.yaml
        > service.yaml
      Chart.yaml
      values-HelloWorld2.yaml   
      values-qa.yaml    

values.yaml

Is it possible to override the values from values.yaml?

Upvotes: 0

Views: 705

Answers (1)

coderanger
coderanger

Reputation: 54267

I'm not 100% sure what you're asking, but in general you can override subchart values at any point by putting them under a key matching the charts name. So something like:

Common:
  foo: bar

Upvotes: 2

Related Questions