kots-lint is a service used for linting Replicated KOTS yaml files.
Linting with this service includes:
- Detecting YAML syntax errors
- Validating with Kubeval
- Utilizing OPA to lint for best practices and some special errors and warnings
Using the production API
$ tar cvf - path/to/folder | curl -XPOST --data-binary @- https://lint.replicated.com/v1/lint
To lint our example
$ tar cvf - example/files-to-lint | curl -XPOST --data-binary @- https://lint.replicated.com/v1/lint
Development
Development for the applications in this project is done through Okteto.
Setup
- Install the Okteto CLI (
brew install okteto)
- Setup Okteto CLI (
okteto context create https://replicated.okteto.dev)
- Setup Okteto context in kubectl (
okteto context update-kubeconfig)
- Deploy your current branch. (from the Vandoor root directory:
okteto pipeline deploy)
The project can also be run with Skaffold for local development and testing.
$ skaffold dev
Once skaffold runs successfully, the service can be reached at http://localhost:30082/v1/lint
Run tests
Tests can be run manually with
$ make test