Skip to content

Commit 94b9621

Browse files
committed
Remove all references to claims
In some cases I've removed large amounts of content, where we're not going to have time to rewrite it to avoid mentioning claims - e.g. how connection secrets work in composition. Signed-off-by: Nic Cope <[email protected]>
1 parent 6699f51 commit 94b9621

11 files changed

+85
-1165
lines changed

content/v2.0-preview/concepts/_index.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,10 @@ building and managing external resources through Kubernetes.
5050
custom API Crossplane creates a single Composite Resource and links all
5151
the related managed resources to it.
5252

53-
* [**Claims**]({{<ref "./claims">}}) are like Composite Resources, but exist
54-
in a Kubernetes namespace. Every Claim links to a single cluster scoped
55-
Composite Resource. Platform users create Claims in their unique namespace,
56-
isolating their resources from other teams in other namespaces.
57-
5853
* [**EnvironmentConfigs**]({{<ref "./environment-configs">}}) are an in-memory
5954
data store, like a Kubernetes ConfigMap. EnvironmentConfigs are useful for
60-
custom resource mapping or storing and retrieving data across Claims and
61-
Composite Resources.
55+
custom resource mapping or storing and retrieving data across Composite
56+
Resources.
6257

6358
* [**Usages**]({{<ref "./usages">}}) defining critical resources or custom
6459
dependency mappings. Usages can prevent Crossplane from deleting or can

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

Lines changed: 26 additions & 181 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,31 @@ description: "Composite Resource Definitions or XRDs define custom API schemas"
55
---
66

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

1111

1212
{{< hint "note" >}}
1313

1414
Read the [composite resources]({{<ref "./composite-resources">}}) page for more
1515
information about composite resources.
16-
17-
Read the [Claims]({{<ref "./claims">}}) page for more
18-
information about Claims.
1916
{{</hint >}}
2017

2118

22-
{{<expand "Confused about Compositions, XRDs, XRs and Claims?" >}}
19+
{{<expand "Confused about Compositions, XRDs, and XRs?" >}}
2320
Crossplane has four core components that users commonly mix up:
2421

2522
* [Compositions]({{<ref "./compositions" >}}) - A template to define how to create resources.
2623
* Composite Resource Definition (`XRD`) - This page. A custom API specification.
2724
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
2825
using the custom API defined in a Composite Resource Definition. XRs use the
2926
Composition template to create new managed resources.
30-
* [Claims]({{<ref "./claims" >}}) (`XRC`) - Like a Composite Resource, but
31-
with namespace scoping.
3227
{{</expand >}}
3328

3429
Crossplane XRDs are like
3530
[Kubernetes custom resource definitions](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/).
36-
XRDs require fewer fields and add options related to Crossplane, like Claims and
37-
connection secrets.
31+
XRDs require fewer fields and add options related to Crossplane, like connection
32+
secrets.
3833

3934
## Creating a CompositeResourceDefinition
4035

@@ -44,7 +39,6 @@ Creating a CompositeResourceDefinition consists of:
4439
* [Defining a custom API schema and version](#xrd-versions).
4540

4641
Optionally, CompositeResourceDefinitions also support:
47-
* [Offering a Claim](#enable-claims).
4842
* [Defining connection secrets](#manage-connection-secrets).
4943
* [Setting composite resource defaults](#set-composite-resource-defaults).
5044

@@ -82,7 +76,7 @@ creates a custom resource definition
8276
```shell {label="kubeapi",copy-lines="3"}
8377
kubectl api-resources
8478
NAME SHORTNAMES APIVERSION NAMESPACED KIND
85-
xmydatabases.example.org v1alpha1 false xmydatabases
79+
xmydatabases.example.org v1alpha1 true xmydatabases
8680
# Removed for brevity
8781
```
8882

@@ -106,12 +100,6 @@ Many XRDs may use the same `group` to create a logical collection of APIs.
106100
<!-- vale write-good.Weasel = YES -->
107101
For example a `database` group may have a `relational` and `nosql` kinds.
108102

109-
{{<hint "tip" >}}
110-
Group names are cluster scoped. Choose group names that don't conflict with
111-
Providers.
112-
Avoid Provider names in the group.
113-
{{< /hint >}}
114-
115103
### XRD names
116104

117105
The `names` field defines how to refer to this specific XRD.
@@ -356,12 +344,9 @@ documentation has more examples.
356344
##### Crossplane reserved fields
357345
358346
Crossplane doesn't allow the following fields in a schema:
359-
* `spec.resourceRef`
360-
* `spec.resourceRefs`
361-
* `spec.claimRef`
362-
* `spec.writeConnectionSecretToRef`
347+
* Any field under the object `spec.crossplane`
348+
* Any field under the object `status.crossplane`
363349
* `status.conditions`
364-
* `status.connectionDetails`
365350

366351
Crossplane ignores any fields matching the reserved fields.
367352

@@ -495,84 +480,23 @@ spec:
495480
Changing or expanding the XRD schema requires restarting the [Crossplane pod]({{<ref "./pods#crossplane-pod">}}) to take effect.
496481
{{< /hint >}}
497482

498-
### Enable Claims
499-
500-
Optionally, XRDs can allow Claims to use the XRD API.
501-
502-
{{<hint "note" >}}
503-
504-
Read the [Claims]({{<ref "./claims">}}) page for more
505-
information about Claims.
506-
{{</hint >}}
507-
508-
XRDs offer Claims with a
509-
{{<hover label="claim" line="10">}}claimNames{{</hover >}} object.
510-
511-
The {{<hover label="claim" line="10">}}claimNames{{</hover >}} defines a
512-
{{<hover label="claim" line="11">}}kind{{</hover >}} and
513-
{{<hover label="claim" line="12">}}plural{{</hover >}} like the XRD
514-
{{<hover label="claim" line="7">}}names{{</hover >}} object.
515-
Also like XRD
516-
{{<hover label="claim" line="7">}}names{{</hover >}}, use UpperCamelCase
517-
for the
518-
{{<hover label="claim" line="11">}}kind{{</hover >}} and lowercase for the
519-
{{<hover label="claim" line="12">}}plural{{</hover >}}.
520-
521-
The Claim
522-
{{<hover label="claim" line="11">}}kind{{</hover >}} and
523-
{{<hover label="claim" line="12">}}plural{{</hover >}} must be unique. They
524-
can't match any other Claim or other XRD
525-
{{<hover label="claim" line="8">}}kind{{</hover >}}.
526-
527-
{{<hint "tip" >}}
528-
Common Crossplane convention is to use
529-
{{<hover label="claim" line="10">}}claimNames{{</hover >}} that match the XRD
530-
{{<hover label="claim" line="7">}}names{{</hover >}}, but without the beginning
531-
"x."
532-
{{</hint >}}
533-
534-
```yaml {label="claim",copy-lines="none"}
535-
apiVersion: apiextensions.crossplane.io/v1
536-
kind: CompositeResourceDefinition
537-
metadata:
538-
name: xdatabases.custom-api.example.org
539-
spec:
540-
group: custom-api.example.org
541-
names:
542-
kind: xDatabase
543-
plural: xdatabases
544-
claimNames:
545-
kind: Database
546-
plural: databases
547-
versions:
548-
# Removed for brevity
549-
```
550-
551-
{{<hint "important" >}}
552-
You can't change the
553-
{{<hover label="claim" line="10">}}claimNames{{</hover >}}
554-
after they're defined. You must delete and
555-
recreate the XRD to change the
556-
{{<hover label="claim" line="10">}}claimNames{{</hover >}}.
557-
{{</hint >}}
558-
559483
### Manage connection secrets
560484

561485
When a composite resource creates managed resources, Crossplane provides any
562486
[connection secrets]({{<ref "./managed-resources#writeconnectionsecrettoref">}})
563-
to the composite resource or Claim. This requires the creators of composite
564-
resources and Claims to know the secrets provided by a managed resource.
565-
In other cases, Crossplane administrators may not want to expose some or all the
566-
generated connection secrets.
487+
to the composite resource. This requires the creators of composite resources to
488+
know the secrets provided by a managed resource. In other cases, Crossplane
489+
administrators may not want to expose some or all the generated connection
490+
secrets.
567491

568492
XRDs can define a list of
569493
{{<hover label="key" line="10">}}connectionSecretKeys{{</hover>}}
570-
to limit what's provided to a composite resource or Claim.
494+
to limit what's provided to a composite resource.
571495

572496
Crossplane only provides the keys listed in the
573497
{{<hover label="key" line="10">}}connectionSecretKeys{{</hover>}}
574-
to the composite resource or Claim using this XRD. Any other connection
575-
secrets aren't passed to the composite resource or Claim.
498+
to the composite resource using this XRD. Any other connection secrets aren't
499+
passed to the composite resource.
576500

577501
{{<hint "important" >}}
578502
The keys listed in the
@@ -591,7 +515,7 @@ For example, an XRD passes the keys
591515
{{<hover label="key" line="12">}}password{{</hover>}} and
592516
{{<hover label="key" line="13">}}address{{</hover>}}.
593517

594-
Composite resources or Claims save these in the secret defined by their
518+
Composite resources save these in the secret defined by their
595519
`writeConnectionSecretToRef` field.
596520

597521
```yaml {label="key",copy-lines="none"}
@@ -621,61 +545,14 @@ For more information on connection secrets read the
621545
[Connection Secrets knowledge base article]({{<ref "connection-details">}}).
622546

623547
### Set composite resource defaults
624-
XRDs can set default parameters for composite resources and Claims.
625-
626-
<!-- vale off -->
627-
#### defaultCompositeDeletePolicy
628-
<!-- vale on -->
629-
The `defaultCompositeDeletePolicy` defines the default value for the claim's
630-
`compositeDeletePolicy` property if the user doesn't specify a value when creating
631-
the claim. The claim controller uses the `compositeDeletePolicy` property to specify
632-
the propagation policy when deleting the associated composite.
633-
The `compositeDeletePolicy` doesn't apply to standalone composites that don't have
634-
associated claims.
635-
636-
Using a `defaultCompositeDeletePolicy: Background` policy causes the CRD for the claim to have
637-
the default value `Background` for the `compositeDeletePolicy` property.
638-
When a deleted claim has the `compositeDeletePolicy` property set to `Background`
639-
the claim controller deletes the composite resource using the propagation policy `background`
640-
and returns, relying on Kubernetes to delete the remaining child objects,
641-
like managed resources, nested composites and secrets.
642-
643-
Using `defaultCompositeDeletePolicy: Foreground` causes the CRD for the claim to have
644-
the `compositeDeletePolicy` default value `Foreground`. When a deleted claim has the
645-
`compositeDeletePolicy` property set to `Foreground` the controller
646-
deletes the associated composite using the propagation policy `foreground`. This causes Kubernetes
647-
to use foreground cascading deletion which deletes all child resources before deleting the
648-
parent resource. The claim controller waits for the composite deletion to finish before returning.
649-
650-
When creating a claim the user can override the `defaultCompositeDeletePolicy` by including
651-
the `spec.compositeDeletePolicy` property with either the `Background` or `Foreground` value.
652-
653-
The default value is `defaultCompositeDeletePolicy: Background`.
654-
655-
Set
656-
{{<hover label="delete" line="6">}}defaultCompositeDeletePolicy: Foreground{{</hover>}}
657-
to change the XRD deletion policy.
658-
659-
```yaml {label="delete",copy-lines="none"}
660-
apiVersion: apiextensions.crossplane.io/v1
661-
kind: CompositeResourceDefinition
662-
metadata:
663-
name: xdatabases.custom-api.example.org
664-
spec:
665-
defaultCompositeDeletePolicy: Foreground
666-
group: custom-api.example.org
667-
names:
668-
# Removed for brevity
669-
versions:
670-
# Removed for brevity
671-
```
548+
XRDs can set default parameters for composite resources.
672549

673550
<!-- vale off -->
674551
#### defaultCompositionRef
675552
<!-- vale on -->
676553
It's possible for multiple [Compositions]({{<ref "./compositions">}}) to
677554
reference the same XRD. If more than one Composition references the same XRD,
678-
the composite resource or Claim must select which Composition to use.
555+
the composite resource must select which Composition to use.
679556

680557
An XRD can define the default Composition to use with the
681558
`defaultCompositionRef` value.
@@ -704,16 +581,16 @@ spec:
704581
<!-- vale on -->
705582

706583
Changes to a Composition generate a new Composition revision. By default all
707-
composite resources and Claims use the updated Composition revision.
584+
composite resources use the updated Composition revision.
708585

709586
Set the XRD `defaultCompositionUpdatePolicy` to `Manual` to prevent composite
710-
resources and Claims from automatically using the new revision.
587+
resources from automatically using the new revision.
711588

712589
The default value is `defaultCompositionUpdatePolicy: Automatic`.
713590

714591
Set {{<hover label="compRev" line="6">}}defaultCompositionUpdatePolicy: Manual{{</hover>}}
715-
to set the default Composition update policy for composite resources and Claims
716-
using this XRD.
592+
to set the default Composition update policy for composite resources and using
593+
this XRD.
717594

718595
```yaml {label="compRev",copy-lines="none"}
719596
apiVersion: apiextensions.crossplane.io/v1
@@ -732,11 +609,11 @@ spec:
732609
<!-- vale off -->
733610
#### enforcedCompositionRef
734611
<!-- vale on -->
735-
To require all composite resources or Claims to use a specific Composition use
736-
the `enforcedCompositionRef` setting in the XRD.
612+
To require all composite resources to use a specific Composition use the
613+
`enforcedCompositionRef` setting in the XRD.
737614

738-
For example, to require all composite resources and Claims using this XRD to use
739-
the Composition
615+
For example, to require all composite resources using this XRD to use the
616+
Composition
740617
{{<hover label="enforceComp" line="6">}}myComposition{{</hover>}}
741618
set
742619
{{<hover label="enforceComp" line="6">}}enforcedCompositionRef.name: myComposition{{</hover>}}.
@@ -770,9 +647,6 @@ xdatabases.custom-api.example.org True True 22m
770647
The `ESTABLISHED` field indicates Crossplane installed the Kubernetes custom
771648
resource definition for this XRD.
772649

773-
The `OFFERED` field indicates this XRD offers a Claim and Crossplane installed
774-
the Kubernetes custom resource definitions for the Claim.
775-
776650
### XRD conditions
777651
Crossplane uses a standard set of `Conditions` for XRDs.
778652
View the conditions of a XRD under their `Status` with
@@ -789,9 +663,6 @@ Status:
789663
Reason: WatchingCompositeResource
790664
Status: True
791665
Type: Established
792-
Reason: WatchingCompositeResourceClaim
793-
Status: True
794-
Type: Offered
795666
# Removed for brevity
796667
```
797668

@@ -820,29 +691,3 @@ Type: Established
820691
Status: False
821692
Reason: TerminatingCompositeResource
822693
```
823-
824-
<!-- vale off -->
825-
#### WatchingCompositeResourceClaim
826-
<!-- vale on -->
827-
`Reason: WatchingCompositeResourceClaim` indicates Crossplane defined the new
828-
Kubernetes custom resource definitions related to the offered Claims and is
829-
watching for the creation of new Claims.
830-
831-
```yaml
832-
Type: Offered
833-
Status: True
834-
Reason: WatchingCompositeResourceClaim
835-
```
836-
837-
<!-- vale off -->
838-
#### TerminatingCompositeResourceClaim
839-
<!-- vale on -->
840-
`Reason: TerminatingCompositeResourceClaim` indicates Crossplane is deleting the
841-
custom resource definitions related to the offered Claims and is
842-
terminating the Claims controller.
843-
844-
```yaml
845-
Type: Offered
846-
Status: False
847-
Reason: TerminatingCompositeResourceClaim
848-
```

0 commit comments

Comments
 (0)