Skip to content

Unmodified chart created by helm create doesn't pass helm lint --strict #3822

Closed

Description

@zdw

If you run helm create to create a chart , then immediately try to run helm lint --strict on the created chart, it will report errors:

$ helm create testchart
Creating testchart
 $ helm lint testchart
==> Linting testchart
[INFO] Chart.yaml: icon is recommended

1 chart(s) linted, no failures
$ helm lint --strict testchart
==> Linting testchart
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/: render error in "testchart/templates/service.yaml": template: testchart/templates/_helpers.tpl:15:14: executing "testchart.fullname" at <.Values.fullnameOver...>: map has no entry for key "fullnameOverride"

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

This seems incorrect - one would assume that the default chart would be pedantically correct, even under the most strict lint check.

Output of helm version:

$ helm version -c
Client: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"}

Output of kubectl version: N/A

Cloud Provider/Platform (AKS, GKE, Minikube etc.): N/A

Activity

  1. zdw commented on Apr 3, 2018

    @zdw
    Author

    Adding:

    nameOverride: ""
    fullnameOverride: ""
    

    To the values.yaml file solves this. Should that be included in the default template?

  2. added a commit that references this issue on Apr 3, 2018
    1d3ae54
  3. michelleN commented on Apr 4, 2018

    @michelleN
    Member

    Looks like nameOverride and fullnameOverride are being use in testchart/templates/_helpers.tpl in conditionals where there is always a default. I get your point though and think it makes sense to put those fields in the values.yaml file.

    Any objections @prydonius ?

  4. added a commit that references this issue on Apr 4, 2018
    0ea8573
  5. added 3 commits that reference this issue on Dec 6, 2018
    1a000de
    d83ca8a
    d2f4e09
  6. added a commit that references this issue on Feb 17, 2019
    a0471d6
  7. atejano commented on Jan 13, 2020

    @atejano

    Is the fix officially released? I am running on version v2.15.2 of the helm client and I can still reproduce the issue.

    Actually it's a different error message but maybe same solution will apply:
    [ERROR] templates/: render error in "my-chart/templates/serviceaccount.yaml": template: my-chart/templates/_helpers.tpl:52:54: executing "my-chart.serviceAccountName" at <.Values.serviceAccount.name>: map has no entry for key "name"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions