GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HGData/CRDs-catalog: Popular Kubernetes CRDs (CustomResourceDefinition) in JSON schema format.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

519 Commits
519 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Utilities
Utilities
 
 
aadpodidentity.k8s.io
aadpodidentity.k8s.io
 
 
accesscontextmanager.cnrm.cloud.google.com
accesscontextmanager.cnrm.cloud.google.com
 
 
acid.zalan.do
acid.zalan.do
 
 
acm.services.k8s.aws
acm.services.k8s.aws
 
 
acme.cert-manager.io
acme.cert-manager.io
 
 
actions.github.com
actions.github.com
 
 
actions.summerwind.dev
actions.summerwind.dev
 
 
addons.cluster.x-k8s.io
addons.cluster.x-k8s.io
 
 
agent.k8s.elastic.co
agent.k8s.elastic.co
 
 
agents.x-k8s.io
agents.x-k8s.io
 
 
aiven.io
aiven.io
 
 
alerting.grafana.crossplane.io
alerting.grafana.crossplane.io
 
 
alertsmanagement.azure.com
alertsmanagement.azure.com
 
 
alloydb.cnrm.cloud.google.com
alloydb.cnrm.cloud.google.com
 
 
anywhere.eks.amazonaws.com
anywhere.eks.amazonaws.com
 
 
apiextensions.crossplane.io
apiextensions.crossplane.io
 
 
apigateway.cnrm.cloud.google.com
apigateway.cnrm.cloud.google.com
 
 
apigatewayv2.services.k8s.aws
apigatewayv2.services.k8s.aws
 
 
apigee.cnrm.cloud.google.com
apigee.cnrm.cloud.google.com
 
 
apikeys.cnrm.cloud.google.com
apikeys.cnrm.cloud.google.com
 
 
apimanagement.azure.com
apimanagement.azure.com
 
 
apisix.apache.org
apisix.apache.org
 
 
apm.k8s.elastic.co
apm.k8s.elastic.co
 
 
app.azure.com
app.azure.com
 
 
app.redislabs.com
app.redislabs.com
 
 
app.terraform.io
app.terraform.io
 
 
appcat.vshn.io
appcat.vshn.io
 
 
appconfiguration.azure.com
appconfiguration.azure.com
 
 
appengine.cnrm.cloud.google.com
appengine.cnrm.cloud.google.com
 
 
applicationautoscaling.services.k8s.aws
applicationautoscaling.services.k8s.aws
 
 
appprotect.f5.com
appprotect.f5.com
 
 
appprotectdos.f5.com
appprotectdos.f5.com
 
 
apps.emqx.io
apps.emqx.io
 
 
apps.gitlab.com
apps.gitlab.com
 
 
apps.jfrog.com
apps.jfrog.com
 
 
aquasecurity.github.io
aquasecurity.github.io
 
 
argoproj.io
argoproj.io
 
 
artifactregistry.cnrm.cloud.google.com
artifactregistry.cnrm.cloud.google.com
 
 
authentication.concierge.pinniped.dev
authentication.concierge.pinniped.dev
 
 
authorization.azure.com
authorization.azure.com
 
 
autopilot.k0sproject.io
autopilot.k0sproject.io
 
 
autoscaling.k8s.elastic.co
autoscaling.k8s.elastic.co
 
 
autoscaling.k8s.io
autoscaling.k8s.io
 
 
awspca.cert-manager.io
awspca.cert-manager.io
 
 
awsprovider.k8s.io
awsprovider.k8s.io
 
 
awx.ansible.com
awx.ansible.com
 
 
azmonitoring.coreos.com
azmonitoring.coreos.com
 
 
azureprovider.k8s.io
azureprovider.k8s.io
 
 
barmancloud.cnpg.io
barmancloud.cnpg.io
 
 
batch.azure.com
batch.azure.com
 
 
beat.k8s.elastic.co
beat.k8s.elastic.co
 
 
beyondcorp.cnrm.cloud.google.com
beyondcorp.cnrm.cloud.google.com
 
 
bigquery.cnrm.cloud.google.com
bigquery.cnrm.cloud.google.com
 
 
bigqueryanalyticshub.cnrm.cloud.google.com
bigqueryanalyticshub.cnrm.cloud.google.com
 
 
bigqueryconnection.cnrm.cloud.google.com
bigqueryconnection.cnrm.cloud.google.com
 
 
bigquerydatapolicy.cnrm.cloud.google.com
bigquerydatapolicy.cnrm.cloud.google.com
 
 
bigquerydatatransfer.cnrm.cloud.google.com
bigquerydatatransfer.cnrm.cloud.google.com
 
 
bigqueryreservation.cnrm.cloud.google.com
bigqueryreservation.cnrm.cloud.google.com
 
 
bigtable.cnrm.cloud.google.com
bigtable.cnrm.cloud.google.com
 
 
billingbudgets.cnrm.cloud.google.com
billingbudgets.cnrm.cloud.google.com
 
 
binaryauthorization.cnrm.cloud.google.com
binaryauthorization.cnrm.cloud.google.com
 
 
bitnami.com
bitnami.com
 
 
bmc.tinkerbell.org
bmc.tinkerbell.org
 
 
bootstrap.cluster.x-k8s.io
bootstrap.cluster.x-k8s.io
 
 
cache.azure.com
cache.azure.com
 
 
capi.weave.works
capi.weave.works
 
 
capsule.clastix.io
capsule.clastix.io
 
 
cdn.azure.com
cdn.azure.com
 
 
ceph.rook.io
ceph.rook.io
 
 
cert-manager.io
cert-manager.io
 
 
cert-manager.k8s.cloudflare.com
cert-manager.k8s.cloudflare.com
 
 
certificatemanager.cnrm.cloud.google.com
certificatemanager.cnrm.cloud.google.com
 
 
certmanager.step.sm
certmanager.step.sm
 
 
chisel-operator.io
chisel-operator.io
 
 
cilium.io
cilium.io
 
 
clickhouse-keeper.altinity.com
clickhouse-keeper.altinity.com
 
 
clickhouse.altinity.com
clickhouse.altinity.com
 
 
cloud.google.com
cloud.google.com
 
 
cloud.grafana.crossplane.io
cloud.grafana.crossplane.io
 
 
cloudasset.cnrm.cloud.google.com
cloudasset.cnrm.cloud.google.com
 
 
cloudbuild.cnrm.cloud.google.com
cloudbuild.cnrm.cloud.google.com
 
 
cloudflare-operator.io
cloudflare-operator.io
 
 
cloudfront.services.k8s.aws
cloudfront.services.k8s.aws
 
 
cloudfunctions.cnrm.cloud.google.com
cloudfunctions.cnrm.cloud.google.com
 
 
cloudfunctions2.cnrm.cloud.google.com
cloudfunctions2.cnrm.cloud.google.com
 
 
cloudidentity.cnrm.cloud.google.com
cloudidentity.cnrm.cloud.google.com
 
 
cloudids.cnrm.cloud.google.com
cloudids.cnrm.cloud.google.com
 
 
cloudiot.cnrm.cloud.google.com
cloudiot.cnrm.cloud.google.com
 
 
cloudscheduler.cnrm.cloud.google.com
cloudscheduler.cnrm.cloud.google.com
 
 
cloudsql.cloud.google.com
cloudsql.cloud.google.com
 
 
cloudtasks.cnrm.cloud.google.com
cloudtasks.cnrm.cloud.google.com
 
 
cloudtrail.services.k8s.aws
cloudtrail.services.k8s.aws
 
 
cloudwatch.services.k8s.aws
cloudwatch.services.k8s.aws
 
 
cloudwatchlogs.services.k8s.aws
cloudwatchlogs.services.k8s.aws
 
 
cluster.x-k8s.io
cluster.x-k8s.io
 
 
clusterctl.cluster.x-k8s.io
clusterctl.cluster.x-k8s.io
 
 
clustersecret.io
clustersecret.io
 
 
compute.azure.com
compute.azure.com
 
 

Repository files navigation

CRDs Catalog

This repository aggregates hundreds of 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) Kubernetes 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).

Furthermore, using the Red Hat YAML plugin for VS Code you are able to get intellisense and validation for CRDs.

👉 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.

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

VS Code / Red Hat YAML plugin

This mini-guide assumes that you already have the VS Code editor installed along with the Red Hat YAML plugin.

The basic idea is that you can annotate your YAML files with a $schema property that points to the relevant validation schema. The Red Hat YAML plugin will then use this schema to provide intellisense and validate your YAML files. You can have multiple schema annotations in your files if you have multiple resources in the same file.

The base URL for the schemas is: https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/.

Example:

---
# yaml-language-server: $schema=https://datreeio.github.io/CRDs-catalog/cilium.io/ciliumnetworkpolicy_v2.json
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
[...]
---
# yaml-language-server: $schema=https://datreeio.github.io/CRDs-catalog/cilium.io/ciliumegressgatewaypolicy_v2.json
apiVersion: cilium.io/v2
kind: CiliumEgressGatewayPolicy
[...]

To help annotating your YAML documents, you can use the annotate-yaml utility script. This script will automatically add the $schema property to your YAML documents based on the CRD(s) you are using.


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. Using the script from openapi2jsonschema.py from kubeconform to convert your CRDs from openAPI to JSON schema.

Supported Platforms

This utility supports MacOS and Linux.

Prerequisites

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

  • python3
  • kubectl

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

  • opensource.com - Why you need to use Kubernetes schema validation tools
  • redhat.com - Validating OpenShift Manifests in a GitOps World
  • kubeval/issues/47 - cannot validate CustomResourceDefinitions

About

Popular Kubernetes CRDs (CustomResourceDefinition) in JSON schema format.

Resources

Readme
License
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.