mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-20 10:27:02 +00:00
adding some examples to the readme
This commit is contained in:
parent
c831801d82
commit
110eb1173c
1 changed files with 33 additions and 0 deletions
33
Readme.md
33
Readme.md
|
|
@ -39,6 +39,39 @@ Usage of ./bin/kubeconform:
|
||||||
print results for all resources
|
print results for all resources
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Usage examples
|
||||||
|
|
||||||
|
* Validating a single, valid file
|
||||||
|
```
|
||||||
|
$ ./bin/kubeconform -file fixtures/valid.yaml
|
||||||
|
$ echo $?
|
||||||
|
0
|
||||||
|
```
|
||||||
|
|
||||||
|
* Validating a single invalid file, setting output to json, and printing a summary
|
||||||
|
```
|
||||||
|
$ ./bin/kubeconform -file fixtures/invalid.yaml -summary -output json
|
||||||
|
{
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"filename": "fixtures/invalid.yaml",
|
||||||
|
"kind": "ReplicationController",
|
||||||
|
"version": "v1",
|
||||||
|
"status": "INVALID",
|
||||||
|
"msg": "Additional property templates is not allowed - Invalid type. Expected: [integer,null], given: string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": {
|
||||||
|
"valid": 0,
|
||||||
|
"invalid": 1,
|
||||||
|
"errors": 0,
|
||||||
|
"skipped": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ echo $?
|
||||||
|
1
|
||||||
|
```
|
||||||
|
|
||||||
### Credits
|
### Credits
|
||||||
|
|
||||||
* @garethr for the [Kubeval](https://github.com/instrumenta/kubeval) and
|
* @garethr for the [Kubeval](https://github.com/instrumenta/kubeval) and
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue