Documentation ¶
Overview ¶
Package ccrd generates CustomResourceDefinitions from Crossplane definitions.
v1beta1.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
- func BaseProps() map[string]v1beta1.JSONSchemaProps
- func DefinedInfrastructureSpecProps() map[string]v1beta1.JSONSchemaProps
- func InfrastructurePrinterColumns() []v1beta1.CustomResourceColumnDefinition
- func InfrastructureStatusProps() map[string]v1beta1.JSONSchemaProps
- func IsEstablished(s v1beta1.CustomResourceDefinitionStatus) bool
- func New(o ...Option) (*v1beta1.CustomResourceDefinition, error)
- func NewSpec(t v1alpha1.CRDSpecTemplate) (v1beta1.CustomResourceDefinitionSpec, error)
- func PublishedInfrastructureSpecProps() map[string]v1beta1.JSONSchemaProps
- func RequirementPrinterColumns() []v1beta1.CustomResourceColumnDefinition
- type Option
Constants ¶
const ( PublishedInfrastructureSuffixKind = "Requirement" PublishedInfrastructureSuffixListKind = "RequirementList" PublishedInfrastructureSuffixSingular = "requirement" PublishedInfrastructureSuffixPlural = "requirements" )
The kind of a published infrastructure resource is the kind of the defined infrastructure resource combined with these suffixes.
Variables ¶
This section is empty.
Functions ¶
func BaseProps ¶
func BaseProps() map[string]v1beta1.JSONSchemaProps
BaseProps is a partial OpenAPIV3Schema for the spec fields that Crossplane expects to be present for all CRDs that it creates.
func DefinedInfrastructureSpecProps ¶
func DefinedInfrastructureSpecProps() map[string]v1beta1.JSONSchemaProps
DefinedInfrastructureSpecProps is a partial OpenAPIV3Schema for the spec fields that Crossplane expects to be present for all defined infrastructure resources.
func InfrastructurePrinterColumns ¶ added in v0.11.0
func InfrastructurePrinterColumns() []v1beta1.CustomResourceColumnDefinition
InfrastructurePrinterColumns returns the set of default printer columns that should exist in all generated composite CRDs.
func InfrastructureStatusProps ¶
func InfrastructureStatusProps() map[string]v1beta1.JSONSchemaProps
InfrastructureStatusProps is a partial OpenAPIV3Schema for the status fields that Crossplane expects to be present for all defined or published infrastructure resources.
func IsEstablished ¶
func IsEstablished(s v1beta1.CustomResourceDefinitionStatus) bool
IsEstablished is a helper function to check whether api-server is ready to accept the instances of registered CRD.
func New ¶
func New(o ...Option) (*v1beta1.CustomResourceDefinition, error)
New produces a new CustomResourceDefinition.
func NewSpec ¶
func NewSpec(t v1alpha1.CRDSpecTemplate) (v1beta1.CustomResourceDefinitionSpec, error)
NewSpec produces a CustomResourceDefinitionSpec from the supplied template.
func PublishedInfrastructureSpecProps ¶
func PublishedInfrastructureSpecProps() map[string]v1beta1.JSONSchemaProps
PublishedInfrastructureSpecProps is a partial OpenAPIV3Schema for the spec fields that Crossplane expects to be present for all published infrastructure resources.
func RequirementPrinterColumns ¶ added in v0.11.0
func RequirementPrinterColumns() []v1beta1.CustomResourceColumnDefinition
RequirementPrinterColumns returns the set of default printer columns that should exist in all generated requirement CRDs.
Types ¶
type Option ¶
type Option func(*v1beta1.CustomResourceDefinition) error
An Option configures the supplied CustomResourceDefinition.
func ForInfrastructureDefinition ¶
func ForInfrastructureDefinition(d *v1alpha1.InfrastructureDefinition) Option
ForInfrastructureDefinition configures the CustomResourceDefinition for the supplied InfrastructureDefinition.
func PublishesInfrastructureDefinition ¶
func PublishesInfrastructureDefinition(d *v1alpha1.InfrastructureDefinition, p *v1alpha1.InfrastructurePublication) Option
PublishesInfrastructureDefinition configures the CustomResourceDefinition that publishes the supplied InfrastructureDefinition.