Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 976 Bytes

File metadata and controls

24 lines (18 loc) · 976 Bytes

Pre-commit hooks

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 in charts directory of your repo. Chart-testing documentation.
  • helm-kubeval: Run kubeval over helm template of you chart in charts directory of your repo.

General Usage

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:

  1. Install pre-commit. E.g. pip install pre-commit.
  2. Run pre-commit install in the repo.