Skip to content

Commit

Permalink
Update documentation with recent UI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed Sep 1, 2019
1 parent 8c40ed5 commit eae975a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Card](https://goreportcard.com/badge/github.com/instrumenta/kubeval)](https://go

```
$ kubeval my-invalid-rc.yaml
The document my-invalid-rc.yaml contains an invalid ReplicationController
--> spec.replicas: Invalid type. Expected: integer, given: string
WARN - fixtures/my-invalid-rc.yaml contains an invalid ReplicationController - spec.replicas: Invalid type. Expected: [integer,null], given: string
$ echo $?
1
```
Expand Down
4 changes: 2 additions & 2 deletions docs/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ results, err := kubeval.Validate(fileContents, fileName)
The method signature for `Validate` is:

```go
Validate(config []byte, fileName string) ([]ValidationResult, error)
Validate(input []byte, config kubeval.Config) ([]ValidationResult, error)
```

The simplest way of seeing it's usage is probably in the `kubeval`
[command line tool source code](https://github.com/instrumenta/kubeval/blob/master/cmd/root.go).
[command line tool source code](https://github.com/instrumenta/kubeval/blob/master/main.go).
27 changes: 11 additions & 16 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ At the most basic level, Kubeval is used like so:

```console
$ kubeval my-invalid-rc.yaml
The document my-invalid-rc.yaml contains an invalid ReplicationController
--> spec.replicas: Invalid type. Expected: integer, given: string
WANR - my-invalid-rc.yaml contains an invalid ReplicationController - spec.replicas: Invalid type. Expected: integer, given: string
$ echo $?
1
```
Expand All @@ -21,12 +20,11 @@ used to simulate this behaviour using the `--strict` flag.

```console
$ kubeval additional-properties.yaml
The document additional-properties.yaml contains a valid ReplicationController
PASS - additional-properties.yaml contains a valid ReplicationController
$ echo $?
0
$ kubeval --strict additional-properties.yaml
The document additional-properties.yaml contains an invalid ReplicationController
---> spec: Additional property replicas is not allowed
WARN - additional-properties.yaml contains an invalid ReplicationController - spec: Additional property replicas is not allowed
$ echo $?
1
```
Expand All @@ -41,8 +39,7 @@ manage temporary files.

```console
$ cat my-invalid-rc.yaml | kubeval
The document stdin contains an invalid ReplicationController
--> spec.replicas: Invalid type. Expected: integer, given: string
WARN - stdin contains an invalid ReplicationController - spec.replicas: Invalid type. Expected: integer, given: string
$ echo $?
1
```
Expand All @@ -52,8 +49,7 @@ to replace `stdin` in the output:

```console
$ cat my-invalid-rc.yaml | kubeval --filename="my-invalid-rc.yaml"
The document my-invalid-rc.yaml contains an invalid ReplicationController
--> spec.replicas: Invalid type. Expected: integer, given: string
WARN - my-invalid-rc.yaml contains an invalid ReplicationController - spec.replicas: Invalid type. Expected: integer, given: string
$ echo $?
1
```
Expand All @@ -66,16 +62,16 @@ missing schemas, though this may change in a future major version.

```console
$ kubeval --ignore-missing-schemas fixtures/test_crd.yaml
Warning: Set to ignore missing schemas
The file fixtures/test_crd.yaml containing a SealedSecret was not validated against a schema
WARN - Set to ignore missing schemas
WARN - fixtures/test_crd.yaml containing a SealedSecret was not validated against a schema
```

If you would prefer to be more explicit about which custom resources to skip you can instead
provide a list of resources to skip like so.

```console
$ kubeval --skip-kinds SealedSecret fixtures/test_crd.yam
The file fixtures/test_crd.yaml containing a SealedSecret was not validated against a schema
WARN - fixtures/test_crd.yaml containing a SealedSecret was not validated against a schema
```

## Helm
Expand All @@ -92,8 +88,8 @@ the output.

```console
$ kubeval fixtures/multi_valid_source.yaml
The file chart/templates/primary.yaml contains a valid Service
The file chart/templates/primary.yaml contains a valid ReplicationControlle
PASS - chart/templates/primary.yaml contains a valid Service
PASS - chart/templates/primary.yaml contains a valid ReplicationControlle
```

## Configuring Output
Expand All @@ -112,8 +108,7 @@ As of today `kubeval` supports the following output types:

```console
$ kubeval my-invalid-rc.yaml
The document my-invalid-rc.yaml contains an invalid ReplicationController
--> spec.replicas: Invalid type. Expected: integer, given: string
WARN - my-invalid-rc.yaml contains an invalid ReplicationController - spec.replicas: Invalid type. Expected: integer, given: string
```

#### JSON
Expand Down

0 comments on commit eae975a

Please sign in to comment.