Kubernetes manifest linter using JSON Schema
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Henning Jacobs 3b78121f22 v0.2.0 8 months ago
kube_manifest_lint allow ignoring unknown schemas 8 months ago
tests allow ignoring unknown schemas 8 months ago
.flake8 initial commit 8 months ago
.gitignore initial commit 8 months ago
.pre-commit-config.yaml vendor JSON schemas 8 months ago
.pre-commit-hooks.yaml how to use as pre-commit hook 8 months ago
.travis.yml add pytest and README 8 months ago
Makefile add pytest and README 8 months ago
README.md how to use as pre-commit hook 8 months ago
poetry.lock add pytest and README 8 months ago
pyproject.toml v0.2.0 8 months ago
vendor-schemas.py vendor JSON schemas 8 months ago

README.md

Kubernetes Manifest Linter

Build Status PyPI PyPI - Python Version License

Validate Kubernetes YAML manifests against JSON schema. It will use the Kubernetes v1.17 schemas for validation by default.

Usage:

pip3 install kube-manifest-lint
kube-manifest-lint my-deployment.yaml

Pre Commit Hook

You can use this tool as a pre-commit in your git repository. Example .pre-commit-config.yaml:

repos:
  - repo: https://codeberg.org/hjacobs/kube-manifest-lint
    rev: "0.2.0"
    hooks:
      - id: kube-manifest-lint

Exit Codes

  • 1: file is not a Kubernetes manifests
  • 2: schema for apiVersion/kind was not found
  • 4: schema is deprecated (e.g. using “extensions/v1beta1” instead of “apps/v1”)
  • 8: schema validation failed