Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 747 Bytes

File metadata and controls

29 lines (22 loc) · 747 Bytes

k8svalidate

This is a pre-commit hook to validate input YAML against the Kubernetes API specification.

It will ignore input YAML which are not Kubernetes types (including unknown CRD and unknown other files). If they do match a known API, they are checked.

It uses kubernetes-validate as an upstream.

Usage:

k8s-validate [--kubernetes-version X.X.X] [--exclude glob-pattern] files

Add a section similar to this to your .pre-commit-hooks.yaml:

repos:
  - repo: https://github.com/Agilicus/pre-commit-hook-k8svalidate.git
    rev: v0.0.8
    hooks:
      - id: k8svalidate
        args: [--exclude, "**/*.patch.yaml"]
        files: .yaml$