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
- Variables
- func BaseProps() *extv1.JSONSchemaProps
- func CompositeResourceClaimPrinterColumns() []extv1.CustomResourceColumnDefinition
- func CompositeResourceClaimSpecProps() map[string]extv1.JSONSchemaProps
- func CompositeResourcePrinterColumns() []extv1.CustomResourceColumnDefinition
- func CompositeResourceSpecProps() map[string]extv1.JSONSchemaProps
- func CompositeResourceStatusProps() map[string]extv1.JSONSchemaProps
- func ForCompositeResource(xrd *v1.CompositeResourceDefinition) (*extv1.CustomResourceDefinition, error)
- func ForCompositeResourceClaim(xrd *v1.CompositeResourceDefinition) (*extv1.CustomResourceDefinition, error)
- func GetPropFields(props map[string]extv1.JSONSchemaProps) []string
- func IsEstablished(s extv1.CustomResourceDefinitionStatus) bool
Constants ¶
const ( CategoryClaim = "claim" CategoryComposite = "composite" )
Category names for generated claim and composite CRDs.
const ( LabelKeyNamePrefixForComposed = "crossplane.io/composite" LabelKeyClaimName = "crossplane.io/claim-name" LabelKeyClaimNamespace = "crossplane.io/claim-namespace" )
Label keys.
Variables ¶
var PropagateClaimSpecProps = []string{"compositionRef", "compositionSelector", "compositionRevisionRef", "compositionUpdatePolicy"}
PropagateClaimSpecProps is the list of XRC spec properties to propagate when translating an XRC into an XR.
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.