This commit is contained in:
Jakob Jensen 2025-10-13 13:10:07 +02:00 committed by GitHub
commit 521ee4d1a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,6 +45,8 @@ sys 0m1,069s
* [Proxy support](#Proxy-support)
* [Overriding schemas location](#Overriding-schemas-location)
* [CustomResourceDefinition (CRD) Support](#CustomResourceDefinition-CRD-Support)
* [Datree CRDs-catalog](#datree-crds-catalog)
* [CustomResourceDefinition catalog](#customresourcedefinition-catalog)
* [OpenShift schema Support](#OpenShift-schema-Support)
* [Integrating Kubeconform in the CI](#Integrating-Kubeconform-in-the-CI)
* [Github Workflow](#Github-Workflow)
@ -235,6 +237,16 @@ Here are the variables you can use in -schema-location:
### CustomResourceDefinition (CRD) Support
Because Custom Resources (CR) are not native Kubernetes objects, they are not included in the default schema.
You can provide validation schemas for CRDs by providing a schema location for them, like:
```bash
# Look for the desired schema/s at example.com
$ kubeconform -schema-location default -schema-location 'https://example.com/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' [MANIFEST]
```
#### Datree CRDs-catalog
If your CRs are present in [Datree's CRDs-catalog](https://github.com/datreeio/CRDs-catalog), you can specify this project as an additional registry to lookup:
```bash
@ -280,6 +292,17 @@ $ kubeconform -schema-location default -schema-location 'schemas/{{ .ResourceKin
</p>
</details>
#### CustomResourceDefinition catalog
If your CRs are present in the [CustomResourceDefinition catalog](https://github.com/CustomResourceDefinition/catalog), you can specify this project as an additional registry to lookup:
```bash
# Look in the catalog for the desired schema/s
$ kubeconform -schema-location default -schema-location 'https://raw.githubusercontent.com/CustomResourceDefinition/catalog/main/schema/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' [MANIFEST]
```
This catalog is self-updating and accepts new CRD sources by pull request, see details in their [README](https://github.com/CustomResourceDefinition/catalog/blob/main/README.md#how-to-contribute-crds).
### OpenShift schema Support
You can validate Openshift manifests using a custom schema location. Set the OpenShift version (v3.10.0-4.1.0) to validate