controller-tools: sigs.k8s.io/controller-tools/pkg/schemapatcher Index | Files | Directories

package schemapatcher

import "sigs.k8s.io/controller-tools/pkg/schemapatcher"

Index

Package Files

gen.go

type Generator Uses

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 single-version CRDs, it will simply replace the global schema.

For multi-version 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 multi-version CRDs with identical schemata, it will take care of lifting the per-version schema up to the global schema.

func (Generator) Generate Uses

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

func (Generator) RegisterMarkers Uses

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

Directories

PathSynopsis
internal/yaml

Package schemapatcher imports 14 packages (graph) and is imported by 2 packages. Updated 2019-10-20. Refresh now. Tools for package owners.