Agilicus / pre-commit-hook-k8svalidate

Pre-commit hook to validate Kubernetes YAML against API specification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:Apache License 2.0


Languages

Language:Python 100.0%