Documentation ¶
Overview ¶
Package crd handles the dynamic creation and modification of CustomResourceDefinitions.
Index ¶
- Constants
- func BatchCreateCRDs(ctx context.Context, crdClient clientv1.CustomResourceDefinitionInterface, ...) error
- func Create(ctx context.Context, cfg *rest.Config, crds []CRD) error
- func Objects(crds []CRD) (result []runtime.Object, err error)
- func Print(out io.Writer, crds []CRD) error
- func WriteFile(filename string, crds []CRD) error
- type CRD
- func (c *CRD) Name() string
- func (c CRD) ToCustomResourceDefinition() (runtime.Object, error)
- func (c CRD) ToCustomResourceDefinitionV1Beta1() (*apiextv1beta1.CustomResourceDefinition, error)
- func (c CRD) WithCategories(categories ...string) CRD
- func (c CRD) WithColumn(name, path string) CRD
- func (c CRD) WithColumnsFromStruct(obj interface{}) CRD
- func (c CRD) WithCustomColumn(columns ...apiextv1.CustomResourceColumnDefinition) CRD
- func (c CRD) WithGroup(group string) CRD
- func (c CRD) WithScale() CRD
- func (c CRD) WithSchema(schema *apiextv1.JSONSchemaProps) CRD
- func (c CRD) WithSchemaFromStruct(obj interface{}) CRD
- func (c CRD) WithShortNames(shortNames ...string) CRD
- func (c CRD) WithStatus() CRD
- type Factory
Constants ¶
View Source
const CRDKind = "CustomResourceDefinition"
Variables ¶
This section is empty.
Functions ¶
func BatchCreateCRDs ¶
func BatchCreateCRDs(ctx context.Context, crdClient clientv1.CustomResourceDefinitionInterface, labelSelector labels.Selector, waitDuration time.Duration, crds []*apiextv1.CustomResourceDefinition) error
BatchCreateCRDs will create or update the list of crds if they do not exist. It will wait for a specified amount of time for the CRD status to be established before returning an error. labelSelector can be used to scope the CRDs listed by this function.
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 }
CRD defines information about a CRD that can be used to create a CustomResourceDefinition runtime.Object Deprecated: Rancher does not plan to continue support for dynamically defined CRDs
func NamespacedType ¶
func NamespacedTypes ¶
func NonNamespacedType ¶
func NonNamespacedTypes ¶
func (CRD) ToCustomResourceDefinition ¶
func (CRD) ToCustomResourceDefinitionV1Beta1 ¶
func (c CRD) ToCustomResourceDefinitionV1Beta1() (*apiextv1beta1.CustomResourceDefinition, error)
func (CRD) WithCategories ¶
func (CRD) WithColumn ¶
func (CRD) WithColumnsFromStruct ¶
func (CRD) WithCustomColumn ¶
func (c CRD) WithCustomColumn(columns ...apiextv1.CustomResourceColumnDefinition) CRD
func (CRD) WithSchema ¶
func (c CRD) WithSchema(schema *apiextv1.JSONSchemaProps) CRD
func (CRD) WithSchemaFromStruct ¶
func (CRD) WithShortNames ¶
func (CRD) WithStatus ¶
type Factory ¶
func (*Factory) BatchCreateCRDs ¶
func (*Factory) CreateCRDs ¶
func (f *Factory) CreateCRDs(ctx context.Context, crds ...CRD) (map[schema.GroupVersionKind]*apiextv1.CustomResourceDefinition, error)
Click to show internal directories.
Click to hide internal directories.