xcrd

package
v1.6.2-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package xcrd generates CustomResourceDefinitions from Crossplane definitions.

v1.JSONSchemaProps is incompatible with controller-tools (as of 0.2.4) because it is missing JSON tags and uses float64, which is a disallowed type. We thus copy the entire struct as CRDSpecTemplate. See the below issue: https://github.com/kubernetes-sigs/controller-tools/issues/291

Index

Constants

View Source
const (
	CategoryClaim     = "claim"
	CategoryComposite = "composite"
)

Category names for generated claim and composite CRDs.

View Source
const (
	LabelKeyNamePrefixForComposed = "crossplane.io/composite"
	LabelKeyClaimName             = "crossplane.io/claim-name"
	LabelKeyClaimNamespace        = "crossplane.io/claim-namespace"
)

Label keys.

Variables

View Source
var PropagateSpecProps = []string{"compositionRef", "compositionSelector", "compositionRevisionRef", "compositionUpdatePolicy"}

PropagateSpecProps is the list of XRC spec properties to propagate when translating an XRC into an XR and vice-versa.

Functions

func BaseProps

func BaseProps() *extv1.JSONSchemaProps

BaseProps is a partial OpenAPIV3Schema for the spec fields that Crossplane expects to be present for all CRDs that it creates.

func CompositeResourceClaimPrinterColumns

func CompositeResourceClaimPrinterColumns() []extv1.CustomResourceColumnDefinition

CompositeResourceClaimPrinterColumns returns the set of default printer columns that should exist in all generated composite resource claim CRDs.

func CompositeResourceClaimSpecProps

func CompositeResourceClaimSpecProps() map[string]extv1.JSONSchemaProps

CompositeResourceClaimSpecProps is a partial OpenAPIV3Schema for the spec fields that Crossplane expects to be present for all published infrastructure resources.

func CompositeResourcePrinterColumns

func CompositeResourcePrinterColumns() []extv1.CustomResourceColumnDefinition

CompositeResourcePrinterColumns returns the set of default printer columns that should exist in all generated composite resource CRDs.

func CompositeResourceSpecProps

func CompositeResourceSpecProps() map[string]extv1.JSONSchemaProps

CompositeResourceSpecProps is a partial OpenAPIV3Schema for the spec fields that Crossplane expects to be present for all defined infrastructure resources.

func CompositeResourceStatusProps

func CompositeResourceStatusProps() map[string]extv1.JSONSchemaProps

CompositeResourceStatusProps is a partial OpenAPIV3Schema for the status fields that Crossplane expects to be present for all defined or published infrastructure resources.

func ForCompositeResource

func ForCompositeResource(xrd *v1.CompositeResourceDefinition) (*extv1.CustomResourceDefinition, error)

ForCompositeResource derives the CustomResourceDefinition for a composite resource from the supplied CompositeResourceDefinition.

func ForCompositeResourceClaim

func ForCompositeResourceClaim(xrd *v1.CompositeResourceDefinition) (*extv1.CustomResourceDefinition, error)

ForCompositeResourceClaim derives the CustomResourceDefinition for a composite resource claim from the supplied CompositeResourceDefinition.

func GetPropFields added in v1.1.0

func GetPropFields(props map[string]extv1.JSONSchemaProps) []string

GetPropFields returns the fields from a map of schema properties

func IsEstablished

func IsEstablished(s extv1.CustomResourceDefinitionStatus) bool

IsEstablished is a helper function to check whether api-server is ready to accept the instances of registered CRD.

Types

This section is empty.

Jump to

Keyboard shortcuts

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