crd-schema-gen

module
Version: v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2019 License: Apache-2.0

README

crd-schema-gen

Containerized CRD validation generation

Based on a fork of functionality found in https://github.com/kubernetes-sigs/controller-tools/tree/master/cmd/crd

Looks at types found in currently available CRDs under a project's manifests/ directory and traverses openshift/api types to find matching Golang structs, then generates OpenAPI validations for those CRDs

Running

Build this image:

make images

Then from your operator's repository run:

PKG=${PWD#${GOPATH}/}
docker run -v ${PWD}:/go/${PKG}:Z -w /go/${PKG} openshift/origin-crd-schema-gen --apis-dir vendor/github.com/openshift/api/operator/v1

In this case we mount our local manifests directory where our CRDs reside and the local directory of our API definitions. Then pass the name of that location (relative to the crd-schema-gen GOPATH) to the container (openshift/api).

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL