crd

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCRDVersion = "v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator added in v0.18.0

type Generator struct {
	// OperatorName is the operator's name, ex. app-operator
	OperatorName string
	// OutputDir is the root directory where the output files will be generated.
	OutputDir string
	// isOperatorGo is true when the operator is written in Go.
	IsOperatorGo bool
	// resource contains API information used to configure single-CRD generation.
	// This is only required when isOperatorGo is false.
	Resource scaffold.Resource
	// crdVersion is the API version of the CRD that will be generated.
	// Should be one of [v1, v1beta1]
	CRDVersion string
	// CRDsDir is for the location of the CRD manifests directory e.g "deploy/crds"
	// Both the CRD and CR manifests from this path will be used to populate CSV fields
	// metadata.annotations.alm-examples for CR examples
	// and spec.customresourcedefinitions.owned for owned CRDs
	CRDsDir string
	// ApisDir is for the location of the API types directory e.g "pkg/apis"
	// The CSV annotation comments will be parsed from the types under this path.
	ApisDir string
}

Generator configures the CustomResourceDefintion manifest generator for Go and non-Go projects.

func (Generator) Generate added in v0.18.0

func (g Generator) Generate() (err error)

Generate generates CRD manifests and writes them to g.OutputDir.

Jump to

Keyboard shortcuts

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