helm: Linting breaks with value imports

Helm version used : 2.8.1

Linting basically breaks when importing dictionaries from a child chart, even though helm resolves the import correctly at the end (the chart installs with the correct values). Here is a simple example on how to reproduce the issue :

Suppose we have a parent chart and a child chart from which we import some values.

Child’s values.yaml :

exports:
  data:
    key1: "value1"
    nestedkey: 
      key2: "value2"

In parent requirements.yaml :

    import-values:
      - data

Now when when I reference the first imported value in the parent’s deploy.yaml {{ .Values.key1 }}, linting passes without errors. But when I reference the second one, {{ .Values.nestedkey.key2 }}, the lint breaks :

[ERROR] templates/: render error in “parent/templates/deploy.yaml”: template: parent/templates/deploy.yaml:5:20: executing “parent/templates/deploy.yaml” at <.Values.nestedkey.my…>: can’t evaluate field mykey in type interface {}

Error: 1 chart(s) linted, 1 chart(s) failed

Even though when installed or dry-runned, both imported values are resolved correctly.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 17 (1 by maintainers)

Most upvoted comments

I have the same issue.

/remove-lifecycle rotten /remove-lifecycle stale

If someone came here, like me, looking for an answer - this bug seems to be fixed in v3.8.0.

Not sure if this issue has been resolved? I’m still having the issue with helm 3.6.3