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

Valid YAML checker #280

Open
kfox1111 opened this issue Mar 7, 2024 · 2 comments
Open

Valid YAML checker #280

kfox1111 opened this issue Mar 7, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@kfox1111
Copy link
Collaborator

kfox1111 commented Mar 7, 2024

In our testing, we should helm template -> strict YAML parser to catch things like non unique keys in the generated YAML.

@kfox1111 kfox1111 added the good first issue Good for newcomers label Mar 7, 2024
@erikgb
Copy link
Contributor

erikgb commented Mar 7, 2024

I think the tools to validate this are limited, but I managed to get something out of yamllint:

$ helm template --values values.yaml charts/spire-0.18.1/spire | yamllint - --no-warnings
stdin
  338:1     error    wrong indentation: expected 2 but found 0  (indentation)
  400:1     error    wrong indentation: expected 2 but found 0  (indentation)
  493:1     error    trailing spaces  (trailing-spaces)
  621:1     error    trailing spaces  (trailing-spaces)
  634:11    error    duplication of key "securityContext" in mapping  (key-duplicates)
  710:13    error    wrong indentation: expected 14 but found 12  (indentation)
  760:1     error    trailing spaces  (trailing-spaces)
  772:11    error    wrong indentation: expected 12 but found 10  (indentation)
  902:5     error    wrong indentation: expected 6 but found 4  (indentation)
  905:7     error    wrong indentation: expected 8 but found 6  (indentation)
  924:5     error    wrong indentation: expected 6 but found 4  (indentation)
  927:7     error    wrong indentation: expected 8 but found 6  (indentation)
  949:5     error    wrong indentation: expected 6 but found 4  (indentation)
  952:7     error    wrong indentation: expected 8 but found 6  (indentation)

@faisal-memon
Copy link
Collaborator

Thanks @erikgb would be good to integrate this tool or a similar one.

@faisal-memon faisal-memon self-assigned this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants