crd

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 30 Imported by: 48

Documentation

Index

Constants

View Source
const CRDKind = "CustomResourceDefinition"

Variables

This section is empty.

Functions

func Create added in v0.7.0

func Create(ctx context.Context, cfg *rest.Config, crds []CRD) error

func Objects added in v0.7.0

func Objects(crds []CRD) (result []runtime.Object, err error)

func Print added in v0.7.0

func Print(out io.Writer, crds []CRD) error

func WriteFile added in v0.7.0

func WriteFile(filename string, crds []CRD) error

Types

type CRD

type CRD struct {
	GVK          schema.GroupVersionKind
	PluralName   string
	SingularName string
	NonNamespace bool
	Schema       *apiextv1.JSONSchemaProps
	SchemaObject interface{}
	Columns      []apiextv1.CustomResourceColumnDefinition
	Status       bool
	Scale        bool
	Categories   []string
	ShortNames   []string
	Labels       map[string]string
	Annotations  map[string]string

	Override runtime.Object
}

func FromGV

func FromGV(gv schema.GroupVersion, kind string) CRD

func NamespacedType

func NamespacedType(name string) CRD

func NamespacedTypes

func NamespacedTypes(names ...string) (ret []CRD)

func New added in v0.5.0

func New(group, version string) CRD

func NonNamespacedType

func NonNamespacedType(name string) CRD

func NonNamespacedTypes

func NonNamespacedTypes(names ...string) (ret []CRD)

func (CRD) ToCustomResourceDefinition

func (c CRD) ToCustomResourceDefinition() (runtime.Object, error)

func (CRD) ToCustomResourceDefinitionV1Beta1 added in v0.8.5

func (c CRD) ToCustomResourceDefinitionV1Beta1() (*apiextv1beta1.CustomResourceDefinition, error)

func (CRD) WithCategories added in v0.3.1

func (c CRD) WithCategories(categories ...string) CRD

func (CRD) WithColumn added in v0.6.0

func (c CRD) WithColumn(name, path string) CRD

func (CRD) WithColumnsFromStruct added in v0.6.0

func (c CRD) WithColumnsFromStruct(obj interface{}) CRD

func (CRD) WithCustomColumn added in v0.3.0

func (c CRD) WithCustomColumn(columns ...apiextv1.CustomResourceColumnDefinition) CRD

func (CRD) WithGroup added in v0.7.0

func (c CRD) WithGroup(group string) CRD

func (CRD) WithScale added in v0.3.0

func (c CRD) WithScale() CRD

func (CRD) WithSchema added in v0.3.0

func (c CRD) WithSchema(schema *apiextv1.JSONSchemaProps) CRD

func (CRD) WithSchemaFromStruct added in v0.5.0

func (c CRD) WithSchemaFromStruct(obj interface{}) CRD

func (CRD) WithShortNames added in v0.3.1

func (c CRD) WithShortNames(shortNames ...string) CRD

func (CRD) WithStatus added in v0.3.0

func (c CRD) WithStatus() CRD

type Factory

type Factory struct {
	CRDClient clientset.Interface
	// contains filtered or unexported fields
}

func NewFactoryFromClient

func NewFactoryFromClient(config *rest.Config) (*Factory, error)

func (*Factory) BatchCreateCRDs

func (f *Factory) BatchCreateCRDs(ctx context.Context, crds ...CRD) *Factory

func (*Factory) BatchWait

func (f *Factory) BatchWait() error

func (*Factory) CreateCRDs

Jump to

Keyboard shortcuts

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