Remove more traces of xmydatabase

No more claims means no more x prefix!

Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
Nic Cope 2025-03-28 23:25:45 -07:00
parent 1f375236ca
commit 66ca410298
2 changed files with 18 additions and 18 deletions

View File

@ -53,12 +53,12 @@ Creating a new API requires defining an API
apiVersion: apiextensions.crossplane.io/v1 apiVersion: apiextensions.crossplane.io/v1
kind: CompositeResourceDefinition kind: CompositeResourceDefinition
metadata: metadata:
name: xmydatabases.example.org name: mydatabases.example.org
spec: spec:
group: example.org group: example.org
names: names:
kind: XMyDatabase kind: XMyDatabase
plural: xmydatabases plural: mydatabases
versions: versions:
- name: v1alpha1 - name: v1alpha1
# Removed for brevity # Removed for brevity
@ -68,14 +68,14 @@ After applying an XRD, Crossplane creates a new Kubernetes custom resource
definition matching the defined API. definition matching the defined API.
For example, the XRD For example, the XRD
{{<hover label="xrd1" line="4">}}xmydatabases.example.org{{</hover >}} {{<hover label="xrd1" line="4">}}mydatabases.example.org{{</hover >}}
creates a custom resource definition creates a custom resource definition
{{<hover label="kubeapi" line="2">}}xmydatabases.example.org{{</hover >}}. {{<hover label="kubeapi" line="2">}}mydatabases.example.org{{</hover >}}.
```shell {label="kubeapi",copy-lines="3"} ```shell {label="kubeapi",copy-lines="3"}
kubectl api-resources kubectl api-resources
NAME SHORTNAMES APIVERSION NAMESPACED KIND NAME SHORTNAMES APIVERSION NAMESPACED KIND
xmydatabases.example.org v1alpha1 true xmydatabases mydatabases.example.org v1alpha1 true mydatabases
# Removed for brevity # Removed for brevity
``` ```
@ -118,9 +118,9 @@ The XRD
{{<hover label="xrdName" line="6">}}group{{</hover>}}. {{<hover label="xrdName" line="6">}}group{{</hover>}}.
For example, {{<hover label="xrdName" For example, {{<hover label="xrdName"
line="4">}}xmydatabases.example.org{{</hover>}} matches the {{<hover line="4">}}mydatabases.example.org{{</hover>}} matches the {{<hover
label="xrdName" line="9">}}plural{{</hover>}} name label="xrdName" line="9">}}plural{{</hover>}} name
{{<hover label="xrdName" line="9">}}xmydatabases{{</hover>}}, `.` {{<hover label="xrdName" line="9">}}mydatabases{{</hover>}}, `.`
{{<hover label="xrdName" line="6">}}group{{</hover>}} name, {{<hover label="xrdName" line="6">}}group{{</hover>}} name,
{{<hover label="xrdName" line="6">}}example.org{{</hover>}}. {{<hover label="xrdName" line="6">}}example.org{{</hover>}}.
@ -128,12 +128,12 @@ label="xrdName" line="9">}}plural{{</hover>}} name
apiVersion: apiextensions.crossplane.io/v1 apiVersion: apiextensions.crossplane.io/v1
kind: CompositeResourceDefinition kind: CompositeResourceDefinition
metadata: metadata:
name: xmydatabases.example.org name: mydatabases.example.org
spec: spec:
group: example.org group: example.org
names: names:
kind: XMyDatabase kind: XMyDatabase
plural: xmydatabases plural: mydatabases
# Removed for brevity # Removed for brevity
``` ```
{{</hint >}} {{</hint >}}

View File

@ -30,16 +30,16 @@ 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 custom API users call to request the set of resources. The Composition defines the set of resources to create. The XRD defines the
custom API users call to request the set of resources.
![Diagram of the relationship of Crossplane components](/media/composition-how-it-works.svg) ![Diagram of the relationship of Crossplane components](/media/composition-how-it-works.svg)
XRDs define the API used to create a composite resource. XRDs define the API used to create a composite resource. For example,
For example,
this {{<hover label="xrd1" line="2">}}CompositeResourceDefinition{{</hover>}} this {{<hover label="xrd1" line="2">}}CompositeResourceDefinition{{</hover>}}
creates a custom API endpoint creates a custom API endpoint
{{<hover label="xrd1" line="4">}}xmydatabases.example.org{{</hover>}}. {{<hover label="xrd1" line="4">}}mydatabases.example.org{{</hover>}}.
```yaml {label="xrd1",copy-lines="none"} ```yaml {label="xrd1",copy-lines="none"}
apiVersion: apiextensions.crossplane.io/v1 apiVersion: apiextensions.crossplane.io/v1
@ -55,7 +55,7 @@ spec:
``` ```
When a user calls the custom API, When a user calls the custom API,
{{<hover label="xrd1" line="4">}}xmydatabases.example.org{{</hover>}}, {{<hover label="xrd1" line="4">}}mydatabases.example.org{{</hover>}},
Crossplane chooses the Composition to use based on the Composition's Crossplane chooses the Composition to use based on the Composition's
{{<hover label="typeref" line="6">}}compositeTypeRef{{</hover>}} {{<hover label="typeref" line="6">}}compositeTypeRef{{</hover>}}
@ -196,8 +196,8 @@ Find the Composition revision name from
```shell {label="getcomprev",copy-lines="1"} ```shell {label="getcomprev",copy-lines="1"}
kubectl get compositionrevision kubectl get compositionrevision
NAME REVISION XR-KIND XR-APIVERSION AGE NAME REVISION XR-KIND XR-APIVERSION AGE
my-composition-5c976ad 1 xmydatabases example.org/v1alpha1 65m my-composition-5c976ad 1 mydatabases example.org/v1alpha1 65m
my-composition-b5aa1eb 2 xmydatabases example.org/v1alpha1 64m my-composition-b5aa1eb 2 mydatabases example.org/v1alpha1 64m
``` ```
{{< /hint >}} {{< /hint >}}
@ -316,6 +316,6 @@ creating a reference between the resource and owning composite resource.
```shell {label="complabel",copy-lines="1"} ```shell {label="complabel",copy-lines="1"}
kubectl describe mydatabase.example.org/my-database-x9rx9 kubectl describe mydatabase.example.org/my-database-x9rx9
Name: my-database2-x9rx9 Name: my-database2-x9rx9
Namespace: Namespace: default
Labels: crossplane.io/composite=my-database-x9rx9 Labels: crossplane.io/composite=my-database-x9rx9
``` ```