instrumenta / kubeval

Validate your Kubernetes configuration files, supports multiple Kubernetes versions
https://kubeval.com
Other
3.16k stars 229 forks source link

Error Reports can be much more specific #56

Open FarzanRNobakht opened 6 years ago

FarzanRNobakht commented 6 years ago

I have a yaml file containing configurations for multiple Kubernetes resources

when i run kubeval

I get a one line report!:

* Missing a kind key

and it does not specify where in file the error has occured

garethr commented 6 years ago

Good idea. I'll look into whether the YAML parser exposes this information, or I need to do something when handling errors of that type.

wkhere commented 6 years ago

Yep,

adding a line number would be an obvious helpful addition to the error reporting

orrc commented 5 years ago

Similarly, indicating which file failed would be useful. e.g. this runs against 16 files, but aborts if a single file fails, without mentioning which one:

$ kubeval -v 1.11.4 --strict **/*.yml
1 error occurred:

* Missing a kind key

And yes, line number would definitely be useful, e.g. a situation I just had: 😄

$ kubeval -v 1.11.4 --strict **/*.yml
…
The document dev/foo_deployment.yml contains an invalid Deployment
---> name: Additional property name is not allowed

$ grep name: dev/foo_deployment.yml | wc -l
      23
sgalsaleh commented 4 years ago

Any updates on this?

ghost commented 4 years ago

Any updates?

uberspot commented 3 years ago

+1 for a --verbose flag.

tielur commented 2 years ago

+1 this would be super helpful RIGHT now 😆