• Stars
    star
    479
  • Rank 91,384 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 2 years ago
  • Updated 14 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Popular Kubernetes CRDs (CustomResourceDefinition) in JSON schema format.

CRDs Catalog

This repository aggregates over 300 popular Kubernetes CRDs (CustomResourceDefinition) in JSON schema format. These schemas can be used by various tools such as Datree, Kubeconform and Kubeval, as an alternative to kubectl --dry-run, to perform validation on custom (and native) Kuberentes resources.

Running Kubernetes schema validation checks helps apply the "shift-left approach" on machines without giving them access to your cluster (e.g. locally or on CI).

How to use the schemas in the catalog

Datree

datree test [MANIFEST]

Kubeconform

kubeconform -schema-location default -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' [MANIFEST]

kubeval

Only supported with the CRD Extractor

πŸ‘‰ If you encounter custom resources that are not part of the catalog, or you want to validate the schemas in an air-gapped environment, use the CRD Extractor.


CRD Extractor

This repository also contains a handy utility that extracts all CRDs from a cluster and converts them to JSON schema.

What does this utility do?

  1. Checks that the prerequisites are installed.
  2. Extracts your CRDs from your cluster using kubectl.
  3. Downloads a script from the kubeconform repo that converts your CRDs from openAPI to JSON schema.
  4. Runs the script, and saves the output to your machine under $HOME/.datree/crdSchemas/

Supported Platforms

This utility supports MacOS and Linux.

Prerequisites

The following programs are required to be installed on the machine running this utility:

Usage

To use the CRD Extractor:

  1. Download the latest release from this repository.
  2. Extract, and run the utility:
./crd-extractor.sh

image


Shifting left CRD validation - Video by Datree


Contributing CRDs to the catalog

If the catalog is missing public custom resources (CRs) that you would like to automatically validate using these tools, you can open an issue or use the CRD Extractor to add the schemas to this repository by creating a pull request.

Resources

More Repositories

1

datree

Prevent Kubernetes misconfigurations from reaching production (again 😀 )! From code to cloud, Datree provides an E2E policy enforcement solution to run automatic checks for rule violations. See our docs: https://hub.datree.io
Go
6,385
star
2

helm-datree

A Helm plugin to validate charts against the Datree's CLI tool
Shell
112
star
3

kubectl-datree

A kubectl plugin that extends Datree to test resources within the cluster
Shell
51
star
4

jira-backup-py

python script to create, download and upload to s3 your Jira or Confluence cloud instance backup
Python
47
star
5

awesome-datree

βš™οΈ A curated list of resources for using Datree's CLI tool
40
star
6

action-datree

Github action that runs the Datree CLI
Shell
24
star
7

admission-webhook-datree

Datree offers cluster integration that allows you to validate your resources against your configured policy upon pushing them into a cluster, by using an admission webhook.
Go
24
star
8

validate-license-action

Validate a license file exists and is one of the allowed licenses
JavaScript
21
star
9

yaml-schema-validator

An open source yaml schema validator. just like json schema - only better
TypeScript
19
star
10

validating-admission-policy

Kubernetes Validation Admission Policy - local testing guide and valuable resources
12
star
11

serverless-web-template-aws

Serverless Web Template
JavaScript
11
star
12

node-datreeio

πŸ“• datree.io Node.js Module to integrate with NPM
JavaScript
9
star
13

datree-cdk8s

A cdk8s plugin to validate synthesized k8s manifests
TypeScript
9
star
14

datree-pr-checks

datree catalog - in context of your pull requests
JavaScript
6
star
15

kubernetes-schema-validation

resources for the blog post about Kubernetes schema validation
6
star
16

drone-datree

Drone plugin that runs the Datree CLI
Shell
4
star
17

awesome-gitops

A curated list of awesome GitOps open source repos, guides, blogs, and other resources.
4
star
18

codefresh-datree

Shell
3
star
19

examples

Smarty
3
star
20

datree-orb

datree CircleCi Orb
2
star
21

production-merges

Get a list of repositories that need merging to production
JavaScript
2
star
22

datree-circleci-orb

A CircleCI orb for using the Datree CLI in your CircleCI jobs.
Smarty
2
star
23

GitHub-User-Group

Resources from GitHub User Group Meetup https://www.meetup.com/GitHub-User-Group/
2
star
24

docs

Datree documentation
JavaScript
2
star
25

homebrew-datree

Ruby
1
star
26

icecream

ice cream web service
HCL
1
star
27

cli-downloads-tracker

1
star
28

connect-to-issue-tracker-action

verify that the branch name references an issue tracker(jira ticket)
JavaScript
1
star
29

ecs-fargate-template

Shell
1
star
30

homebrew-datree-staging

Ruby
1
star