Skip to content

Commit 120888f

Browse files
authored
Merge pull request #173 from brendanjryan/bjr-markdown-fixes
style fixes for markdown docs
2 parents 757d0a5 + f4710a4 commit 120888f

File tree

1 file changed

+28
-33
lines changed

1 file changed

+28
-33
lines changed

docs/index.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ $ echo $?
1313
1
1414
```
1515

16-
1716
## Strict schemas
1817

1918
The Kubernetes API allows for specifying properties on objects that are not part of the schemas.
@@ -34,14 +33,13 @@ $ echo $?
3433

3534
If you're using `kubectl` you may find it useful to always set the `--strict` flag.
3635

37-
3836
## Stdin
3937

4038
Alternatively Kubeval can also take input via `stdin` which can make using
4139
it as part of an automated pipeline easier by removing the need to securely
4240
manage temporary files.
4341

44-
```
42+
```console
4543
$ cat my-invalid-rc.yaml | kubeval
4644
The document stdin contains an invalid ReplicationController
4745
--> spec.replicas: Invalid type. Expected: integer, given: string
@@ -52,22 +50,21 @@ $ echo $?
5250
To make the output of pipelines more readable, a filename can be injected
5351
to replace `stdin` in the output:
5452

55-
```
53+
```console
5654
$ cat my-invalid-rc.yaml | kubeval --filename="my-invalid-rc.yaml"
5755
The document my-invalid-rc.yaml contains an invalid ReplicationController
5856
--> spec.replicas: Invalid type. Expected: integer, given: string
5957
$ echo $?
6058
1
6159
```
6260

63-
6461
## CRDs
6562

6663
Currently kubeval relies on schemas generated from the Kubernetes API. This means it's not
6764
possible to validate resources using CRDs. Currently you need to pass a flag to ignore
6865
missing schemas, though this may change in a future major version.
6966

70-
```
67+
```console
7168
$ kubeval --ignore-missing-schemas fixtures/test_crd.yaml
7269
Warning: Set to ignore missing schemas
7370
The file fixtures/test_crd.yaml containing a SealedSecret was not validated against a schema
@@ -76,12 +73,11 @@ The file fixtures/test_crd.yaml containing a SealedSecret was not validated agai
7673
If you would prefer to be more explicit about which custom resources to skip you can instead
7774
provide a list of resources to skip like so.
7875

79-
```
76+
```console
8077
$ kubeval --skip-kinds SealedSecret fixtures/test_crd.yam
8178
The file fixtures/test_crd.yaml containing a SealedSecret was not validated against a schema
8279
```
8380

84-
8581
## Helm
8682

8783
Helm chart configurations generally have a reference to the source template in a comment
@@ -102,38 +98,38 @@ The file chart/templates/primary.yaml contains a valid ReplicationControlle
10298

10399
## Configuring Output
104100

105-
The output of `kubeval` can be configured using the `--output` flag (`-o`).
101+
The output of `kubeval` can be configured using the `--output` flag (`-o`).
106102

107-
As of today `kubeval` supports the following output types:
103+
As of today `kubeval` supports the following output types:
108104

109-
- Plaintext `--output=stdout`
105+
- Plaintext `--output=stdout`
110106
- JSON: `--output=json`
111107
- TAP: `--output=tap`
112108

113-
### Example Output
109+
### Example Output
114110

115-
#### Plaintext
111+
#### Plaintext
116112

117-
```console
113+
```console
118114
$ kubeval my-invalid-rc.yaml
119115
The document my-invalid-rc.yaml contains an invalid ReplicationController
120116
--> spec.replicas: Invalid type. Expected: integer, given: string
121117
```
122118

123-
#### JSON
124-
125-
```console
126-
$ kubeval fixtures/invalid.yaml -o json
127-
[
128-
{
129-
"filename": "fixtures/invalid.yaml",
130-
"kind": "ReplicationController",
131-
"status": "invalid",
132-
"errors": [
133-
"spec.replicas: Invalid type. Expected: [integer,null], given: string"
134-
]
135-
}
136-
]
119+
#### JSON
120+
121+
```console
122+
$ kubeval fixtures/invalid.yaml -o json
123+
[
124+
{
125+
"filename": "fixtures/invalid.yaml",
126+
"kind": "ReplicationController",
127+
"status": "invalid",
128+
"errors": [
129+
"spec.replicas: Invalid type. Expected: [integer,null], given: string"
130+
]
131+
}
132+
]
137133
```
138134

139135
#### TAP
@@ -144,7 +140,6 @@ The document my-invalid-rc.yaml contains an invalid ReplicationController
144140
not ok 1 - fixtures/invalid.yaml (ReplicationController) - spec.replicas: Invalid type. Expected: [integer,null], given: string
145141
```
146142

147-
148143
## Full usage instructions
149144

150145
```console
@@ -172,16 +167,16 @@ Flags:
172167

173168
The command has three important features:
174169

175-
* You can pass one or more files as arguments, including using wildcard
170+
- You can pass one or more files as arguments, including using wildcard
176171
expansion. Each file will be validated in turn, and `kubeval` will
177172
exit with a non-zero code if _any_ of the files fail validation.
178-
* You can toggle between the upstream Kubernetes definitions and the
173+
- You can toggle between the upstream Kubernetes definitions and the
179174
expanded OpenShift ones using the `--openshift` flag. The default is
180175
to use the upstream Kubernetes definitions.
181-
* You can pass a version of Kubernetes or OpenShift and the relevant
176+
- You can pass a version of Kubernetes or OpenShift and the relevant
182177
type schemas for that version will be used. For instance:
183178

184-
```
179+
```console
185180
$ kubeval -v 1.6.6 my-deployment.yaml
186181
$ kubeval --openshift -v 1.5.1 my-deployment.yaml
187182
```

0 commit comments

Comments
 (0)