This repo defines Git pre-commit hooks intended for use with pre-commit. More hooks available here.
- ct-lint: Automatically run
ct linton your Helm charts inchartsdirectory of your repo. Chart-testing documentation. - helm-kubeval: Run kubeval over
helm templateof you chart inchartsdirectory of your repo.
In each of your repos, add a file called .pre-commit-config.yaml with the following contents:
repos:
- repo: https://github.com/hornwind/pre-commit
rev: v0.2.0
hooks:
- id: ct-lint
- id: helm-kubeval
args: ["--kubernetes-version", "1.19.0"]Next, have every developer:
- Install pre-commit. E.g.
pip install pre-commit. - Run
pre-commit installin the repo.