This repo defines Git pre-commit hooks intended for use with pre-commit. More hooks available here.
- ct-lint: Automatically run
ct lint
on your Helm charts incharts
directory of your repo. Chart-testing documentation. - helm-kubeval: Run kubeval over
helm template
of you chart incharts
directory 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 install
in the repo.