mirror of https://github.com/crossplane/docs.git
Rework "Confused about Compositions..." box
I think we can achieve the goal without explicitly saying this confuses people. Also reorder so that it starts with what an XR is (the goal) then talks about how to achieve the goal (XRDs, Compositions). Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
parent
2931cd15ba
commit
7f70c27670
|
@ -6,7 +6,7 @@ description: "Composite Resource Definitions or XRDs define custom API schemas"
|
||||||
|
|
||||||
Composite resource definitions (`XRDs`) define the schema for a custom API.
|
Composite resource definitions (`XRDs`) define the schema for a custom API.
|
||||||
Users create composite resources (`XRs`) using the API schema defined by an
|
Users create composite resources (`XRs`) using the API schema defined by an
|
||||||
`XRD`.
|
XRD.
|
||||||
|
|
||||||
|
|
||||||
{{<hint "note">}}
|
{{<hint "note">}}
|
||||||
|
@ -15,14 +15,14 @@ information about composite resources.
|
||||||
{{</hint>}}
|
{{</hint>}}
|
||||||
|
|
||||||
|
|
||||||
{{<expand "Confused about Compositions, XRDs, and XRs?" >}}
|
{{<expand "What are XRs, XRDs and Compositions?" >}}
|
||||||
Crossplane has four core components that users commonly mix up:
|
A [composite resource]({{<ref "./composite-resources">}}) or XR is a custom API.
|
||||||
|
|
||||||
* [Compositions]({{<ref "./compositions" >}}) - A template to define how to create resources.
|
You use two Crossplane types to create a new custom API:
|
||||||
* Composite Resource Definition (`XRD`) - This page. A custom API specification.
|
|
||||||
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
|
* A Composite Resource Definition (XRD) - This page. Defines the XR's schema.
|
||||||
using the custom API defined in a Composite Resource Definition. XRs use the
|
* A [Composition]({{<ref "./compositions" >}}) - Configures how the XR creates
|
||||||
Composition template to create other resources.
|
other resources.
|
||||||
{{</expand >}}
|
{{</expand >}}
|
||||||
|
|
||||||
Crossplane XRDs are like
|
Crossplane XRDs are like
|
||||||
|
|
|
@ -13,15 +13,15 @@ Composite resources are a _composite_ of Kubernetes resources.
|
||||||
A _Composition_ defines how to _compose_ the resources together.
|
A _Composition_ defines how to _compose_ the resources together.
|
||||||
{{< /hint >}}
|
{{< /hint >}}
|
||||||
|
|
||||||
{{<expand "Confused about Compositions, XRDs and XRs?" >}}
|
{{<expand "What are XRs, XRDs and Compositions?" >}}
|
||||||
Crossplane has four core components that users commonly mix up:
|
A composite resource or XR (this page) is a custom API.
|
||||||
|
|
||||||
* [Compositions]({{<ref "./compositions">}}) - A template to define how to create resources.
|
You use two Crossplane types to create a new custom API:
|
||||||
* [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
|
|
||||||
(`XRD`) - A custom API specification.
|
* A [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
|
||||||
* Composite Resource (`XR`) - This page. Created by
|
(XRD) - Defines the XR's schema.
|
||||||
using the custom API defined in a Composite Resource Definition. XRs use the
|
* A [Composition]({{<ref "./compositions" >}}) - Configures how the XR creates
|
||||||
Composition template to create new resources.
|
other resources.
|
||||||
{{</expand >}}
|
{{</expand >}}
|
||||||
|
|
||||||
## Create composite resources
|
## Create composite resources
|
||||||
|
@ -29,7 +29,7 @@ Crossplane has four core components that users commonly mix up:
|
||||||
Creating composite resources requires a
|
Creating composite resources requires a
|
||||||
[Composition]({{<ref "./compositions">}}) and a
|
[Composition]({{<ref "./compositions">}}) and a
|
||||||
[CompositeResourceDefinition]({{<ref "./composite-resource-definitions">}})
|
[CompositeResourceDefinition]({{<ref "./composite-resource-definitions">}})
|
||||||
(`XRD`).
|
(XRD).
|
||||||
|
|
||||||
The Composition defines the set of resources to create. The XRD defines the
|
The Composition defines the set of resources to create. The XRD defines the
|
||||||
custom API users call to request the set of resources.
|
custom API users call to request the set of resources.
|
||||||
|
|
|
@ -52,15 +52,14 @@ spec:
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
{{<expand "Confused about Compositions, XRDs and XRs?" >}}
|
{{<expand "What are XRs, XRDs and Compositions?" >}}
|
||||||
Crossplane has four core components that users commonly mix up:
|
A [composite resource]({{<ref "./composite-resources">}}) or XR is a custom API.
|
||||||
|
|
||||||
* Compositions - This page. A template to define how to create resources.
|
You use two Crossplane types to create a new custom API:
|
||||||
* [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
|
|
||||||
(`XRD`) - A custom API specification.
|
* A [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
|
||||||
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
|
(XRD) - Defines the XR's schema.
|
||||||
using the custom API defined in a Composite Resource Definition. XRs use the
|
* A Composition - This page. Configures how the XR creates other resources.
|
||||||
Composition template to create new resources.
|
|
||||||
{{</expand >}}
|
{{</expand >}}
|
||||||
|
|
||||||
## Create a Composition
|
## Create a Composition
|
||||||
|
@ -79,14 +78,13 @@ to determine what resources it should create when you create a composite
|
||||||
resource (XR).
|
resource (XR).
|
||||||
|
|
||||||
{{<hint "tip" >}}
|
{{<hint "tip" >}}
|
||||||
The Crossplane community has built lots of functions that let you template
|
Crossplane has functions that let you template composed resources using YAML
|
||||||
Crossplane resources using
|
[patch and transforms]({{<ref "../guides/function-patch-and-transform">}}).
|
||||||
[CUE](https://github.com/crossplane-contrib/function-cue),
|
|
||||||
[KCL](https://github.com/crossplane-contrib/function-kcl),
|
|
||||||
Helm-like
|
Helm-like
|
||||||
[Go templates](https://github.com/crossplane-contrib/function-go-templating) or
|
[YAML templates](https://github.com/crossplane-contrib/function-go-templating),
|
||||||
legacy Crossplane
|
[CUE](https://github.com/crossplane-contrib/function-cue),
|
||||||
[Patch and Transforms]({{<ref "../guides/function-patch-and-transform">}}).
|
[KCL](https://github.com/crossplane-contrib/function-kcl), or
|
||||||
|
[Python](https://github.com/crossplane-contrib-function-python).
|
||||||
|
|
||||||
You can also [write your own function](#write-a-composition-function) using Go
|
You can also [write your own function](#write-a-composition-function) using Go
|
||||||
or Python.
|
or Python.
|
||||||
|
|
|
@ -67,18 +67,6 @@ Patch and transform is best for simpler compositions. It intentionally doesn't
|
||||||
support features like loops and conditionals.
|
support features like loops and conditionals.
|
||||||
{{</hint >}}
|
{{</hint >}}
|
||||||
|
|
||||||
{{<expand "Confused about Compositions, XRDs and XRs?" >}}
|
|
||||||
Crossplane has four core components that users commonly mix up:
|
|
||||||
|
|
||||||
* [Composition]({{<ref "../composition/compositions">}}) - A template to define
|
|
||||||
how to create resources.
|
|
||||||
* [composite resource Definition]({{<ref "../composition/composite-resource-definitions">}})
|
|
||||||
(`XRD`) - A custom API specification.
|
|
||||||
* [composite resource]({{<ref "../composition/composite-resources">}}) (`XR`) -
|
|
||||||
Created by using the custom API defined in a composite resource Definition.
|
|
||||||
XRs use the Composition template to create new managed resources.
|
|
||||||
{{</expand >}}
|
|
||||||
|
|
||||||
## Install the function
|
## Install the function
|
||||||
|
|
||||||
You must install Function Patch and Transform before you can use it in a
|
You must install Function Patch and Transform before you can use it in a
|
||||||
|
|
Loading…
Reference in New Issue