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

Linting of values.yaml #633

Open
brucec5 opened this issue Aug 23, 2021 · 3 comments
Open

Linting of values.yaml #633

brucec5 opened this issue Aug 23, 2021 · 3 comments
Labels
type/enhancement New feature or request

Comments

@brucec5
Copy link
Contributor

brucec5 commented Aug 23, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Is your feature request related to a problem? Please describe.

It would be nice if there was a tool for linting consul-helm values.yaml files for semantic correctness.

Notably, there's a number of fields that let you specify raw Consul configuration (eg. server.extraConfig). If there's a typo or type conversion issue, we won't know until we actually deploy the helm chart and servers restart. If there was a linter for this (and other fields), we'd be able to verify it as part of CI.

Feature Description

It would be useful to be able to point to a list of values.yaml files and have a linter validate that all of the values make semantic sense, especially for options that represent raw consul JSON configuration.

Use Case(s)

This should apply to any Consul K8s use case.

Contributions

@brucec5 brucec5 added the type/enhancement New feature or request label Aug 23, 2021
@david-yu
Copy link
Contributor

Hi @brucec5 thanks for the feedback. I assume you probably would want to have a Helm plug-in (https://helm.sh/docs/topics/plugins/) that could be invoked by the Helm CLI to do linting for Consul Config and do something similar to consul validate (see https://www.consul.io/commands/validate)?

@brucec5
Copy link
Contributor Author

brucec5 commented Aug 23, 2021

Yeah, that sounds like a good way to approach this.

@lkysow
Copy link
Member

lkysow commented Aug 23, 2021

There's also support in Helm for JSON schema. Although I don't know if it can recursively validate that strings are valid JSON.

lawliet89 pushed a commit to lawliet89/consul-k8s that referenced this issue Sep 13, 2021
* consul => 1.8.4
* envoy => 1.14.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants