Skip to content

Agilicus/pre-commit-hook-k8svalidate

Repository files navigation

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$

About

Pre-commit hook to validate Kubernetes YAML against API specification

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages