|
| 1 | + |
| 2 | +# Documentation |
| 3 | + |
| 4 | +Welcome to the `kube-linter` documentation. Read on for more detailed information about using and configuring the tool. |
| 5 | + |
| 6 | +## Exploring the CLI |
| 7 | + |
| 8 | +You can run `kube-linter --help` to see a list of supported commands and flags. For each subcommand, you can |
| 9 | +run `kube-linter <subcommand> --help` to see detailed help text and flags for it. |
| 10 | + |
| 11 | +## Running the linter |
| 12 | + |
| 13 | +To lint directories or files, simply run `./kube-linter lint files_or_dirs ...`. If a directory is passed, all files |
| 14 | +with `.yaml` or `.yml` extensions are parsed, and Kubernetes objects are loaded from them. If a file is passed, |
| 15 | +it is parsed irrespective of extension. |
| 16 | + |
| 17 | +Users can pass a config file using the `--config` flag to control which checks are executed, and to configure custom checks. |
| 18 | +An example config file is provided [here](../config.yaml.example). |
| 19 | + |
| 20 | +## Built-in checks |
| 21 | + |
| 22 | +`kube-linter` comes with a list of built-in checks, which you can find [here](generated/checks.md). Only some |
| 23 | +built-in checks are enabled by default -- others must be explicitly enabled in the config. |
| 24 | + |
| 25 | +## Custom checks |
| 26 | + |
| 27 | +### Check Templates |
| 28 | + |
| 29 | +In `kube-linter`, checks are concrete realizations of check templates. A check template describes a class of check -- it |
| 30 | +contains logic (written in Go code) that would execute the check, and lays out (zero or more) parameters that it takes. |
| 31 | + |
| 32 | +The list of supported check templates, along with their metadata, can be found [here](generated/templates.md). |
| 33 | + |
| 34 | +### Custom checks |
| 35 | + |
| 36 | +All checks in `kube-linter` are defined by referencing a check template, passing parameters to it, and adding additional |
| 37 | +check specific metadata (like check name and description). Users can configure custom checks the same way built-in checks |
| 38 | +are configured, and add them to the config file. The built-in checks are specified [here](../internal/builtinchecks). |
0 commit comments