Given a YAML files with Kubernetes Custom Resource Definitions (CRDs), extract the embedded OpenAPI v3 schema and write it to JSON files.
The files are named as expected by Kubeval. Existing files won't be overwritten.
crd2jsonschema crd.yaml --output-directory=schemas/ kubeval my-resource.yaml --directories=schemas/
You'll need Poetry installed.
poetry install --develop=crd2jsonschema poetry run pytest