Open brucec5 opened 3 years ago
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)?
Yeah, that sounds like a good way to approach this.
There's also support in Helm for JSON schema. Although I don't know if it can recursively validate that strings are valid JSON.
Community Note
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