instrumenta / instrumenta/kubeval

-o json contains non-json formatted output

Open
#238 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3.2k
Forks
227
PR merge metrics
No merged PRs in 30d

Description

When specifying JSON output, kubeval prints any warnings and errors at the top of the output in plain text, making it difficult to parse the output programatically.

eg:
```
c:\> kubeval -d .\folder --ignore-missing-schemas -o json
WARN - Set to ignore missing schemas
[
{
"filename": "folder\\subfolder\\configfile.yaml",
"kind": "Namespace",
"status": "valid",
"errors": []
}
]
```

Suggestion to either remove these from the output, or add them to the output as native JSON, eg:

```
{
"Warnings: [{"msg" : "Set to ignore missing schemas"],
"Errors": [],
"Results" : [
{
"filename": "folder\\subfolder\\configfile.yaml",
"kind": "Namespace",
"status": "valid",
"errors": []
}
]
}
```

Version information:
```
Version: 0.15.0
Commit: df50ea7fd4fd202458002a40a6a39ffbb3125bad
Date: 2020-04-14T09:32:29Z
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.