aws-privateca-issuer icon indicating copy to clipboard operation
aws-privateca-issuer copied to clipboard

[Bug]: Helm Chart fails linting due to whitespace

Open kcraley opened this issue 3 years ago • 1 comments

Describe the expected outcome

When performing linting using helm lint on the Helm Chart, linting should succeed. Additionally, to ensure issues do not occur with changes to the Helm Chart, linting should be included as part of the testing actions.

Describe the actual outcome

When performing linting using helm lint on the Helm Chart, the command fails due to an invalid YAML document separator. After debugging this further, this is caused by incorrect template directives causing issues with whitespace, particularly on line 15 in templates/rbac.yaml. The dash at the end of that line moves that line to the line above. Removing the right dash in the directive, fixes the issue.

Steps to reproduce

This can be reproduced by either using helm or helmfile binaries to performing the linting. If linting using the helmfile binary, the below steps are basically automated.

  1. Add the Helm repository
$ helm repo add awspca https://cert-manager.github.io/aws-privateca-issuer
$ helm repo update
  1. Pull the Helm Chart locally
$ helm pull awspca/aws-privateca-issuer -d ./awspca --untar
  1. Lint the chart
$ helm lint awspca/aws-privateca-issuer

Relevant log output

$ helm lint awspca/aws-privateca-issuer

==> Linting awspca/aws-privateca-issuer
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/rbac.yaml: unable to parse YAML: invalid Yaml document separator: apiVersion: rbac.authorization.k8s.io/v1

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

Version

Helm Chart Version: 1.2.2 Helm Application Version: 1.2.2

Have you tried the following?

  • [X] Check the Troubleshooting section
  • [X] Search open issues

Category

Build Issues

Severity

Severity 3

kcraley avatar Aug 16 '22 16:08 kcraley

Hi @kcraley, thanks for bringing this to our attention. This is definitely something that we will fix, but will likely not be treated as a high priority bug and may take some time for us to get to. In the meantime, if you would like to create a PR with a fix, we would be grateful and happy to review it, otherwise we'll get to it in due time.

Thank you again!

divyansh-gupta avatar Aug 16 '22 17:08 divyansh-gupta