Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helmlint always passed #77

Open
tomqwu opened this issue May 31, 2022 · 2 comments
Open

helmlint always passed #77

tomqwu opened this issue May 31, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@tomqwu
Copy link

tomqwu commented May 31, 2022

Describe the bug
helmlint doesn't really lint

the folder structure looks like

tree test-hook
test-hook
└── test
    ├── Chart.yaml
    ├── charts
    ├── templates
    │   ├── NOTES.txt
    │   ├── _helpers.tpl
    │   ├── deployment.yaml
    │   ├── hpa.yaml
    │   ├── ingress.yaml
    │   ├── service.yaml
    │   ├── serviceaccount.yaml
    │   └── tests
    │       └── test-connection.yaml
    └── values.yaml

4 directories, 10 files

To Reproduce
Steps to reproduce the behavior including the relevant Terraform/Terragrunt/Packer version number and any code snippets and module inputs you used.

a default helm lint test run looks like

helm lint test 
==> Linting test
[INFO] Chart.yaml: icon is recommended
[ERROR] values.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 79: did not find expected key
[ERROR] templates/: cannot load values.yaml: error converting YAML to JSON: yaml: line 79: did not find expected key
[ERROR] : unable to load chart
        cannot load values.yaml: error converting YAML to JSON: yaml: line 79: did not find expected key

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

But the pre-commit run looks like

pre-commit run --all-files
helmlint.................................................................Passed

here is the pre-commit config

repos:
  - repo: https://github.com/gruntwork-io/pre-commit
    rev: v0.1.17 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
    hooks:
      - id: helmlint

Expected behavior
The helmlint should give the same result as helm lint

Additional context
Add any other context about the problem here.

@tomqwu tomqwu added the bug Something isn't working label May 31, 2022
@tomqwu
Copy link
Author

tomqwu commented May 31, 2022

pre-commit run --all-files -verbose shows this

.cache/pre-commit/repoz_8jwzgx/hooks/helmlint.sh: line 68: realpath: command not found

After installing the package the problem is resolved, the getting started doc should add this as a dependency.

brew install coreutils

@slettner
Copy link

+1 on this issue, would be helpful to document this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants