A pre-commit hook to validate Kubernetes manifests using kubeconform.
- kubeconform installed and
available on
PATH - kustomize (only if using the kustomize hook)
Add the following to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/neteye-platform/kubeconform-precommit
rev: v0.1.0
hooks:
- id: kubeconformTo validate kustomize overlays, use the kubeconform-kustomize hook and pass
the overlay paths via args:
repos:
- repo: https://github.com/neteye-platform/kubeconform-precommit
rev: v0.1.0
hooks:
- id: kubeconform-kustomize
args: [path/to/overlay1, path/to/overlay2]Use --kubeconform-args to forward flags to kubeconform:
hooks:
- id: kubeconform
args: [--kubeconform-args, "-strict -ignore-missing-schemas"]