kubeval icon indicating copy to clipboard operation
kubeval copied to clipboard

Error Reports can be much more specific

Open FarzanRNobakht opened this issue 7 years ago • 7 comments

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

FarzanRNobakht avatar Feb 22 '18 11:02 FarzanRNobakht

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.

garethr avatar Feb 24 '18 10:02 garethr

Yep,

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

wkhere avatar May 23 '18 14:05 wkhere

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

orrc avatar Jan 24 '19 14:01 orrc

Any updates on this?

sgalsaleh avatar Mar 13 '20 19:03 sgalsaleh

Any updates?

ghost avatar Apr 17 '20 13:04 ghost

+1 for a --verbose flag.

uberspot avatar Oct 30 '20 18:10 uberspot

+1 this would be super helpful RIGHT now 😆

tielur avatar May 06 '22 18:05 tielur