Skip to content

Make valuesFiles field on helm templatable #2849

@Markcial

Description

@Markcial

Expected behavior

When i try to deploy with my helm configuration loading files depending on environment variables.

deploy:
  helm:
    releases:
    - name: <µs-name>
      chartPath: chart/path
      valuesFiles:
      - values/values-{{.ENVIRONMENT}}.yaml
      values:
        image: my-container
... snip... 

I expect the helm deployer to load the configuration file defined for that environment.

Actual behavior

The templater doesn't apply environment variables to that field.

https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/deploy/helm.go#L262 The valuesFiles are sent to the expandPaths without replacing values.

The templating section https://skaffold.dev/docs/how-tos/templating/ explains that this field cannot be templated. But that field could easily be templated because the templater is declared on the same file. Thing is, there are no plans to make that field templatable?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions