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

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

Closed
cmontemuino opened this issue Nov 21, 2023 · 2 comments
Closed

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

cmontemuino opened this issue Nov 21, 2023 · 2 comments

Comments

@cmontemuino
Copy link
Contributor

What steps did you take and what happened:

git clone [email protected]: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:

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

{{- 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

  • LVM Driver version
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
@abhilashshetty04
Copy link
Contributor

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

cmontemuino added a commit to cmontemuino/lvm-localpv that referenced this issue Nov 22, 2023
The hyphen at the end of the closing brackes is responsible for chomping
all the whitespaces after the brackets. Thus, a previous YAML separator
gets into the same line as the `apiVersion` element from the resource
enable by the `if` statement.

fixes openebs#271

Signed-off-by: cmontemuino <[email protected]>
cmontemuino added a commit to cmontemuino/lvm-localpv that referenced this issue Nov 22, 2023
The hyphen at the end of the closing brackets is responsible for chomping
all the whitespaces after the brackets. Thus, a previous YAML separator
gets into the same line as the `apiVersion` element from the resource
enable by the `if` statement.

fixes openebs#271

Signed-off-by: cmontemuino <[email protected]>
@cmontemuino
Copy link
Contributor Author

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

Here it is: #272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants