openebs / lvm-localpv

Dynamically provision Stateful Persistent Node-Local Volumes & Filesystems for Kubernetes that is integrated with a backend LVM2 data storage stack.
Apache License 2.0
251 stars 96 forks source link

helm lint fails due to extra hyphen in if statement #271

Closed cmontemuino closed 10 months ago

cmontemuino commented 10 months ago

What steps did you take and what happened:

git clone git@github.com:openebs/lvm-localpv.git
git checkout lvm-localpv-1.3.0
cd deploy/helm/charts
helm lint .

Output:

==> Linting .
[ERROR] templates/rbac.yaml: unable to parse YAML: invalid Yaml document separator: apiVersion: v1

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

What did you expect to happen:

I would expect this output instead:

==> Linting .

1 chart(s) linted, 0 chart(s) failed

Anything else you would like to add:

Offending code: https://github.com/openebs/lvm-localpv/blob/400159dad72980818fe9bad01a53d383afa20466/deploy/helm/charts/templates/rbac.yaml#L126

{{- if .Values.serviceAccount.lvmNode.create -}}

The hyphen before the closing brackets is chomping all the whitespace after the brackets.

I'd like to open a PR with the fix.

Environment:

Not applicable

abhilashshetty04 commented 10 months ago

Hi @cmontemuino , Thanks for creating the issue. Please go ahead and raise the PR.

cmontemuino commented 10 months ago

Hi @cmontemuino , Thanks for creating the issue. Please go ahead and raise the PR.

Here it is: https://github.com/openebs/lvm-localpv/pull/272