Skip to content

Commit 7f70c27

Browse files
committed
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 <[email protected]>
1 parent 2931cd1 commit 7f70c27

File tree

4 files changed

+32
-46
lines changed

4 files changed

+32
-46
lines changed

content/v2.0-preview/composition/composite-resource-definitions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: "Composite Resource Definitions or XRDs define custom API schemas"
66

77
Composite resource definitions (`XRDs`) define the schema for a custom API.
88
Users create composite resources (`XRs`) using the API schema defined by an
9-
`XRD`.
9+
XRD.
1010

1111

1212
{{<hint "note">}}
@@ -15,14 +15,14 @@ information about composite resources.
1515
{{</hint>}}
1616

1717

18-
{{<expand "Confused about Compositions, XRDs, and XRs?" >}}
19-
Crossplane has four core components that users commonly mix up:
18+
{{<expand "What are XRs, XRDs and Compositions?" >}}
19+
A [composite resource]({{<ref "./composite-resources">}}) or XR is a custom API.
2020

21-
* [Compositions]({{<ref "./compositions" >}}) - A template to define how to create resources.
22-
* Composite Resource Definition (`XRD`) - This page. A custom API specification.
23-
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
24-
using the custom API defined in a Composite Resource Definition. XRs use the
25-
Composition template to create other resources.
21+
You use two Crossplane types to create a new custom API:
22+
23+
* A Composite Resource Definition (XRD) - This page. Defines the XR's schema.
24+
* A [Composition]({{<ref "./compositions" >}}) - Configures how the XR creates
25+
other resources.
2626
{{</expand >}}
2727

2828
Crossplane XRDs are like

content/v2.0-preview/composition/composite-resources.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ Composite resources are a _composite_ of Kubernetes resources.
1313
A _Composition_ defines how to _compose_ the resources together.
1414
{{< /hint >}}
1515

16-
{{<expand "Confused about Compositions, XRDs and XRs?" >}}
17-
Crossplane has four core components that users commonly mix up:
18-
19-
* [Compositions]({{<ref "./compositions">}}) - A template to define how to create resources.
20-
* [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
21-
(`XRD`) - A custom API specification.
22-
* Composite Resource (`XR`) - This page. Created by
23-
using the custom API defined in a Composite Resource Definition. XRs use the
24-
Composition template to create new resources.
16+
{{<expand "What are XRs, XRDs and Compositions?" >}}
17+
A composite resource or XR (this page) is a custom API.
18+
19+
You use two Crossplane types to create a new custom API:
20+
21+
* A [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
22+
(XRD) - Defines the XR's schema.
23+
* A [Composition]({{<ref "./compositions" >}}) - Configures how the XR creates
24+
other resources.
2525
{{</expand >}}
2626

2727
## Create composite resources
2828

2929
Creating composite resources requires a
3030
[Composition]({{<ref "./compositions">}}) and a
3131
[CompositeResourceDefinition]({{<ref "./composite-resource-definitions">}})
32-
(`XRD`).
32+
(XRD).
3333

3434
The Composition defines the set of resources to create. The XRD defines the
3535
custom API users call to request the set of resources.

content/v2.0-preview/composition/compositions.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,14 @@ spec:
5252
```
5353
5454
55-
{{<expand "Confused about Compositions, XRDs and XRs?" >}}
56-
Crossplane has four core components that users commonly mix up:
57-
58-
* Compositions - This page. A template to define how to create resources.
59-
* [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
60-
(`XRD`) - A custom API specification.
61-
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
62-
using the custom API defined in a Composite Resource Definition. XRs use the
63-
Composition template to create new resources.
55+
{{<expand "What are XRs, XRDs and Compositions?" >}}
56+
A [composite resource]({{<ref "./composite-resources">}}) or XR is a custom API.
57+
58+
You use two Crossplane types to create a new custom API:
59+
60+
* A [Composite Resource Definition]({{<ref "./composite-resource-definitions">}})
61+
(XRD) - Defines the XR's schema.
62+
* A Composition - This page. Configures how the XR creates other resources.
6463
{{</expand >}}
6564
6665
## Create a Composition
@@ -79,14 +78,13 @@ to determine what resources it should create when you create a composite
7978
resource (XR).
8079
8180
{{<hint "tip" >}}
82-
The Crossplane community has built lots of functions that let you template
83-
Crossplane resources using
84-
[CUE](https://github.com/crossplane-contrib/function-cue),
85-
[KCL](https://github.com/crossplane-contrib/function-kcl),
81+
Crossplane has functions that let you template composed resources using YAML
82+
[patch and transforms]({{<ref "../guides/function-patch-and-transform">}}).
8683
Helm-like
87-
[Go templates](https://github.com/crossplane-contrib/function-go-templating) or
88-
legacy Crossplane
89-
[Patch and Transforms]({{<ref "../guides/function-patch-and-transform">}}).
84+
[YAML templates](https://github.com/crossplane-contrib/function-go-templating),
85+
[CUE](https://github.com/crossplane-contrib/function-cue),
86+
[KCL](https://github.com/crossplane-contrib/function-kcl), or
87+
[Python](https://github.com/crossplane-contrib-function-python).
9088
9189
You can also [write your own function](#write-a-composition-function) using Go
9290
or Python.

content/v2.0-preview/guides/function-patch-and-transform.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,6 @@ Patch and transform is best for simpler compositions. It intentionally doesn't
6767
support features like loops and conditionals.
6868
{{</hint >}}
6969
70-
{{<expand "Confused about Compositions, XRDs and XRs?" >}}
71-
Crossplane has four core components that users commonly mix up:
72-
73-
* [Composition]({{<ref "../composition/compositions">}}) - A template to define
74-
how to create resources.
75-
* [composite resource Definition]({{<ref "../composition/composite-resource-definitions">}})
76-
(`XRD`) - A custom API specification.
77-
* [composite resource]({{<ref "../composition/composite-resources">}}) (`XR`) -
78-
Created by using the custom API defined in a composite resource Definition.
79-
XRs use the Composition template to create new managed resources.
80-
{{</expand >}}
81-
8270
## Install the function
8371
8472
You must install Function Patch and Transform before you can use it in a

0 commit comments

Comments
 (0)