Don't say composition is for managed resources

It's for all resources now!

Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
Nic Cope 2025-03-28 23:21:46 -07:00
parent b54dc8b0e6
commit 1f375236ca
4 changed files with 24 additions and 34 deletions

View File

@ -22,7 +22,7 @@ Crossplane has four core components that users commonly mix up:
* 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 new managed resources.
Composition template to create other resources.
{{</expand >}}
Crossplane XRDs are like

View File

@ -4,13 +4,13 @@ weight: 10
description: "Composite resources, an XR or XRs, represent a collection of related cloud resources."
---
A composite resource represents a set of managed resources as a single
A composite resource represents a set of Kubernetes resources as a single
Kubernetes object. Crossplane creates composite resources when users access a
custom API, defined in the CompositeResourceDefinition.
{{<hint "tip" >}}
Composite resources are a _composite_ of managed resources.
A _Composition_ defines how to _compose_ the managed resources together.
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?" >}}
@ -21,7 +21,7 @@ Crossplane has four core components that users commonly mix up:
(`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 managed resources.
Composition template to create new resources.
{{</expand >}}
## Creating composite resources
@ -269,7 +269,7 @@ Use
{{<hover label="desccomposite" line="1">}}kubectl describe composite{{</hover>}}
to view the linked
{{<hover label="desccomposite" line="16">}}Composition Ref{{</hover>}},
and unique managed resources created in the
and unique resources created in the
{{<hover label="desccomposite" line="22">}}Resource Refs{{</hover>}}.
@ -297,25 +297,21 @@ Spec:
### Composite resource conditions
The conditions of composite resources match the conditions of their managed
The conditions of composite resources match the conditions of their composed
resources.
Read the
[conditions section]({{<ref "../managed-resources/managed-resources#conditions">}}) of the
managed resources documentation for details.
## Composite resource labels
Crossplane adds labels to composite resources to show their relationship to
other Crossplane components.
### Composite label
Crossplane adds the
{{<hover label="complabel" line="4">}} crossplane.io/composite{{</hover>}} label
to all composite resources. The label matches the name of the composite.
Crossplane applies the composite label to any managed resource created by a
composite, creating a reference between the managed resource and owning
composite resource.
to all composed resources. The label matches the name of the composite.
Crossplane applies the composite label to anyresource created by a composite,
creating a reference between the resource and owning composite resource.
```shell {label="complabel",copy-lines="1"}
kubectl describe mydatabase.example.org/my-database-x9rx9

View File

@ -10,8 +10,8 @@ familiarity with Crossplane, and particularly with
A `Composition` configures how Crossplane should reconcile a Composite Resource
(XR). Put otherwise, when you create an XR the selected `Composition` determines
what managed resources Crossplane will create in response. Let's say for example
that you define a `PlatformDB` XR, which represents your organisation's common
what resources Crossplane will create in response. Let's say for example that
you define a `PlatformDB` XR, which represents your organisation's common
database configuration of an Azure MySQL Server and a few firewall rules. The
`Composition` contains the 'base' configuration for the MySQL server and the
firewall rules that are extended by the configuration for the `PlatformDB`.

View File

@ -8,11 +8,11 @@ aliases:
description: "Compositions are a template for creating Crossplane resources"
---
Compositions are a template for creating multiple managed resources as a single
object.
Compositions are a template for creating multiple Kubernetes resources as a
single _composite_ resource.
A Composition _composes_ individual managed resources together into a larger,
reusable, solution.
A Composition _composes_ individual resources together into a larger, reusable,
solution.
An example Composition may combine a virtual machine, storage resources and
networking policies. A Composition template links all these individual
@ -60,7 +60,7 @@ Crossplane has four core components that users commonly mix up:
(`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 managed resources.
Composition template to create new resources.
{{</expand >}}
## Create a Composition
@ -145,8 +145,8 @@ you create a composite resource. The Function also tells Crossplane what to do
with these resources when you update or delete a composite resource.
When Crossplane calls a Function it sends it the current state of the composite
resource. It also sends it the current state of any managed resources the
composite resource owns.
resource. It also sends it the current state of any resources the composite
resource owns.
Crossplane knows what Function to call when a composite resource changes by
looking at the Composition the composite resource uses.
@ -239,11 +239,10 @@ spec:
```
### Enable composite resources
### Match composite resources
A Composition is only a template defining how to create managed
resources. A Composition limits which Composite Resources can use this
template.
A Composition is only a template defining how to create composed resources. A
Composition limits which kind of composite resource (XR) can use this template.
A Composition's {{<hover label="typeref" line="6">}}compositeTypeRef{{</hover>}}
defines which Composite Resource type can use this Composition.
@ -559,13 +558,8 @@ stable, so the Function returns the same exact request two times in a row.
Crossplane errors if stability isn't reached after 5 iterations.
{{<hint "tip">}}
<!-- vale write-good.Weasel = NO -->
<!-- Disable Weasel to say "usually", which is correct in this context. -->
A _composed_ resource is a resource created by a composite resource. Composed
resources are usually Crossplane managed resources (MRs), but they can be any
kind of Crossplane resource. For example a composite resource could also create
a ProviderConfig, or another kind of composite resource.
<!-- vale write-good.Weasel = YES -->
resources can be any kind of Kubernetes resource.
{{</hint>}}
### Observed state