Helm lint "[ERROR] templates/" failure in CI
helm lint renders the chart and validates it, reporting [INFO], [WARNING], and [ERROR] lines. Any [ERROR] makes lint exit non-zero, which fails a CI lint gate. The message points at the file and problem.
What this error means
helm lint ends with "[ERROR] templates/: ..." and "Error: 1 chart(s) linted, 1 chart(s) failed", returning a non-zero exit code in CI.
==> Linting ./chart
[ERROR] templates/: template: my-app/templates/service.yaml:12:14: executing ... at
<.Values.service.port>: nil pointer evaluating interface {}.port
Error: 1 chart(s) linted, 1 chart(s) failedCommon causes
A template fails to render
A nil pointer, a missing required value, or invalid YAML in a template renders as an [ERROR] during lint.
Values do not satisfy the schema
When values.schema.json exists, lint validates the supplied values and reports violations as errors.
How to fix it
Lint with the same values CI uses
- Run lint with the environment values file so it renders like the real deploy.
- Fix the template or value the [ERROR] line names.
- Re-run until only [INFO]/[WARNING] remain.
helm lint ./chart -f values-prod.yamlTreat warnings strictly where wanted
Use --strict to fail on warnings too, so style problems are caught before they become errors.
helm lint ./chart --strictHow to prevent it
- Run
helm lint -f <values>for every environment in CI. - Fix [WARNING] lines before they escalate.
- Keep a values schema so bad values fail lint, not deploy.