Replace ancient diagram with mermaidjs

RIP last mention of claims (hopefully).

Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
Nic Cope 2025-03-28 23:46:11 -07:00
parent 1ad436082b
commit 8dd741a208
2 changed files with 30 additions and 8 deletions

View File

@ -4,9 +4,9 @@ weight: 10
description: "Composite resources, an XR or XRs, represent a collection of related cloud resources." description: "Composite resources, an XR or XRs, represent a collection of related cloud resources."
--- ---
A composite resource represents a set of Kubernetes resources as a single A composite resource, or XR, represents a set of Kubernetes resources as a
Kubernetes object. Crossplane creates composite resources when users access a single Kubernetes object. Crossplane creates composite resources when users
custom API, defined in the CompositeResourceDefinition. access a custom API, defined in the CompositeResourceDefinition.
{{<hint "tip" >}} {{<hint "tip" >}}
Composite resources are a _composite_ of Kubernetes resources. Composite resources are a _composite_ of Kubernetes resources.
@ -24,7 +24,7 @@ Crossplane has four core components that users commonly mix up:
Composition template to create new resources. Composition template to create new resources.
{{</expand >}} {{</expand >}}
## Creating composite resources ## Create composite resources
Creating composite resources requires a Creating composite resources requires a
[Composition]({{<ref "./compositions">}}) and a [Composition]({{<ref "./compositions">}}) and a
@ -34,7 +34,29 @@ Creating composite resources requires a
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.
![Diagram of the relationship of Crossplane components](/media/composition-how-it-works.svg) ```mermaid
flowchart TD
user(["User"])
xr("Composite Resource (XR)")
xrd("Composite Resource Definition (XRD)")
comp("Composition")
cda("Composed Resource A")
cdb("Composed Resource B")
cdc("Composed Resource C")
xrd -.defines.-> xr
comp configure-xr@-.configures.-> xr
user --creates--> xr
xr compose-a@--composes-->cda
xr compose-b@--composes-->cdb
xr compose-c@--composes-->cdc
configure-xr@{animate: true}
compose-a@{animate: true}
compose-b@{animate: true}
compose-c@{animate: true}
```
XRDs define the API used to create a composite resource. For example, XRDs define the API used to create a composite resource. For example,
this {{<hover label="xrd1" line="2">}}CompositeResourceDefinition{{</hover>}} this {{<hover label="xrd1" line="2">}}CompositeResourceDefinition{{</hover>}}
@ -297,7 +319,7 @@ Spec:
### Composite resource conditions ### Composite resource conditions
A composite resource has two status conditions Synced and Ready. A composite resource has two status conditions: Synced and Ready.
Crossplane sets the Synced status condition to True when it's able to Crossplane sets the Synced status condition to True when it's able to
successfully reconcile the composite resource. If Crossplane can't reconcile the successfully reconcile the composite resource. If Crossplane can't reconcile the
@ -308,7 +330,7 @@ composition function pipeline reports that all of its composed resources are
ready. If a composed resource isn't ready Crossplane will report it in the ready. If a composed resource isn't ready Crossplane will report it in the
Ready condition. Ready condition.
## Composed resource labels ## Composite resource labels
Crossplane adds labels to composed resources to show their relationship to Crossplane adds labels to composed resources to show their relationship to
other Crossplane components. other Crossplane components.

View File

@ -5,7 +5,7 @@ aliases:
- composition - composition
- composition-functions - composition-functions
- /knowledge-base/guides/composition-functions - /knowledge-base/guides/composition-functions
description: "Compositions are a template for creating Crossplane resources" description: "Compositions are a template for creating composite resources"
--- ---
Compositions are a template for creating multiple Kubernetes resources as a Compositions are a template for creating multiple Kubernetes resources as a