crd

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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