Skip to content

Question: How to handle global variables across helmfiles #398

@AndresPineros

Description

@AndresPineros

Is it possible to share global variables between helmfiles in the following manner?

Let's say I have one global variables file called globals.yaml, that has this content:

spring:
  regex: "some value"

dotnet:
  regex: "some other value"

And multiple helmfiles that depending on what we want can grab the spring or the dotnet value (this is what I want to know if is possible):

....
releases:
  - name: myrelease1 
    namespace: default
    chart: mycharts/mychart
    version: 0.1.0
    values:
      - globals.yaml
      - regex: {{ spring.regex }}

and

....
releases:
  - name: myrelease2
    namespace: default
    chart: mycharts/mychart
    version: 0.1.0
    values:
      - globals.yaml
      - regex: {{ dotnet.regex }}

So basically for each release, I can pass the global variable I want to a variable that is already defined in the chart.
Is there a way to do this or simulate this behavior?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions