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.
|
||||
Users create composite resources (`XRs`) using the API schema defined by an
|
||||
`XRD`.
|
||||
XRD.
|
||||
|
||||
|
||||
{{<hint "note">}}
|
||||
|
@ -15,14 +15,14 @@ information about composite resources.
|
|||
{{</hint>}}
|
||||
|
||||
|
||||
{{<expand "Confused about Compositions, XRDs, and XRs?" >}}
|
||||
Crossplane has four core components that users commonly mix up:
|
||||
{{<expand "What are XRs, XRDs and Compositions?" >}}
|
||||
A [composite resource]({{<ref "./composite-resources">}}) or XR is a custom API.
|
||||
|
||||
* [Compositions]({{<ref "./compositions" >}}) - A template to define how to create resources.
|
||||
* Composite Resource Definition (`XRD`) - This page. A custom API specification.
|
||||
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
|
||||
using the custom API defined in a Composite Resource Definition. XRs use the
|
||||
Composition template to create other resources.
|
||||
You use two Crossplane types to create a new custom API:
|
||||
|
||||
* A Composite Resource Definition (XRD) - This page. Defines the XR's schema.
|
||||
* A [Composition]({{<ref "./compositions" >}}) - Configures how the XR creates
|
||||
other resources.
|
||||
{{</expand >}}
|
||||
|
||||
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.
|
||||
{{< /hint >}}
|
||||
|
||||
{{<expand "Confused about Compositions, XRDs and XRs?" >}}
|
||||
Crossplane has four core components that users commonly mix up:
|
||||
{{<expand "What are XRs, XRDs and Compositions?" >}}
|
||||
A composite resource or XR (this page) is a custom API.
|
||||
|
||||
* [Compositions]({{<ref "./compositions">}}) - A template to define how to create resources.
|
||||
* [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
|
||||
(`XRD`) - A custom API specification.
|
||||
* Composite Resource (`XR`) - This page. Created by
|
||||
using the custom API defined in a Composite Resource Definition. XRs use the
|
||||
Composition template to create new resources.
|
||||
You use two Crossplane types to create a new custom API:
|
||||
|
||||
* A [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
|
||||
(XRD) - Defines the XR's schema.
|
||||
* A [Composition]({{<ref "./compositions" >}}) - Configures how the XR creates
|
||||
other resources.
|
||||
{{</expand >}}
|
||||
|
||||
## Create composite resources
|
||||
|
@ -29,7 +29,7 @@ Crossplane has four core components that users commonly mix up:
|
|||
Creating composite resources requires a
|
||||
[Composition]({{<ref "./compositions">}}) and a
|
||||
[CompositeResourceDefinition]({{<ref "./composite-resource-definitions">}})
|
||||
(`XRD`).
|
||||
(XRD).
|
||||
|
||||
The Composition defines the set of resources to create. The XRD defines the
|
||||
custom API users call to request the set of resources.
|
||||
|
|
|
@ -52,15 +52,14 @@ spec:
|
|||
```
|
||||
|
||||
|
||||
{{<expand "Confused about Compositions, XRDs and XRs?" >}}
|
||||
Crossplane has four core components that users commonly mix up:
|
||||
{{<expand "What are XRs, XRDs and Compositions?" >}}
|
||||
A [composite resource]({{<ref "./composite-resources">}}) or XR is a custom API.
|
||||
|
||||
* Compositions - This page. A template to define how to create resources.
|
||||
* [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
|
||||
(`XRD`) - A custom API specification.
|
||||
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
|
||||
using the custom API defined in a Composite Resource Definition. XRs use the
|
||||
Composition template to create new resources.
|
||||
You use two Crossplane types to create a new custom API:
|
||||
|
||||
* A [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
|
||||
(XRD) - Defines the XR's schema.
|
||||
* A Composition - This page. Configures how the XR creates other resources.
|
||||
{{</expand >}}
|
||||
|
||||
## Create a Composition
|
||||
|
@ -79,14 +78,13 @@ to determine what resources it should create when you create a composite
|
|||
resource (XR).
|
||||
|
||||
{{<hint "tip" >}}
|
||||
The Crossplane community has built lots of functions that let you template
|
||||
Crossplane resources using
|
||||
[CUE](https://github.com/crossplane-contrib/function-cue),
|
||||
[KCL](https://github.com/crossplane-contrib/function-kcl),
|
||||
Crossplane has functions that let you template composed resources using YAML
|
||||
[patch and transforms]({{<ref "../guides/function-patch-and-transform">}}).
|
||||
Helm-like
|
||||
[Go templates](https://github.com/crossplane-contrib/function-go-templating) or
|
||||
legacy Crossplane
|
||||
[Patch and Transforms]({{<ref "../guides/function-patch-and-transform">}}).
|
||||
[YAML templates](https://github.com/crossplane-contrib/function-go-templating),
|
||||
[CUE](https://github.com/crossplane-contrib/function-cue),
|
||||
[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
|
||||
or Python.
|
||||
|
|
|
@ -67,18 +67,6 @@ Patch and transform is best for simpler compositions. It intentionally doesn't
|
|||
support features like loops and conditionals.
|
||||
{{</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
|
||||
|
||||
You must install Function Patch and Transform before you can use it in a
|
||||
|
|
Loading…
Reference in New Issue