schemapatcher

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 16 Imported by: ? 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// ManifestsPath contains the CustomResourceDefinition YAML files.
	ManifestsPath string `marker:"manifests"`

	// MaxDescLen specifies the maximum description length for fields in CRD's OpenAPI schema.
	//
	// 0 indicates drop the description for all fields completely.
	// n indicates limit the description to at most n characters and truncate the description to
	// closest sentence boundary if it exceeds n characters.
	MaxDescLen *int `marker:",optional"`
}

Generator patches existing CRDs with new schemata.

For legacy (v1beta1) single-version CRDs, it will simply replace the global schema.

For legacy (v1beta1) multi-version CRDs, and any v1 CRDs, it will replace schemata of existing versions and *clear the schema* from any versions not specified in the Go code. It will *not* add new versions, or remove old ones.

For legacy multi-version CRDs with identical schemata, it will take care of lifting the per-version schema up to the global schema.

It will generate output for each "CRD Version" (API version of the CRD type itself) , e.g. apiextensions/v1beta1 and apiextensions/v1) available.

func (Generator) CheckFilter

func (Generator) CheckFilter() loader.NodeFilter

func (Generator) Generate

func (g Generator) Generate(ctx *genall.GenerationContext) (result error)

func (Generator) Help

func (Generator) RegisterMarkers

func (Generator) RegisterMarkers(into *markers.Registry) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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