diff --git a/content/v2.0-preview/composition/composite-resources.md b/content/v2.0-preview/composition/composite-resources.md index 2acfc060..2e6eb904 100644 --- a/content/v2.0-preview/composition/composite-resources.md +++ b/content/v2.0-preview/composition/composite-resources.md @@ -85,75 +85,6 @@ NAME SYNCED READY COMPOSITION AGE my-composite-resource True True my-composition 4s ``` -### Naming external resources -By default, managed resources created by a composite resource have the name of -the composite resource, followed by a random suffix. - - - -For example, a composite resource named "my-composite-resource" creates external -resources named "my-composite-resource-fqvkw." - - - -Resource names can be deterministic by applying an -{{}}annotation{{}} to the composite -resource. - -```yaml {label="annotation",copy-lines="none"} -apiVersion: example.org/v1alpha1 -kind: MyDatabase -metadata: - namespace: default - name: my-composite-resource - annotations: - crossplane.io/external-name: my-custom-name -# Removed for brevity -``` - -Inside the Composition, use a -{{}}patch{{}} -to apply the external-name to the resources. - -The {{}}fromFieldPath{{}} patch copies the -{{}}metadata.annotations{{}} field from -the composite resource to the -{{}}metadata.annotations{{}} inside the -managed resource. - -{{}} -If a managed resource has the `crossplane.io/external-name` annotation -Crossplane uses the annotation value to name the external resource. -{{}} - -```yaml {label="comp",copy-lines="none"} -apiVersion: apiextensions.crossplane.io/v1 -kind: Composition -metadata: - name: my-composition -spec: - mode: Pipeline - pipeline: - - step: patch-and-transform - functionRef: - name: function-patch-and-transform - input: - apiVersion: pt.fn.crossplane.io/v1beta1 - kind: Resources - resources: - - name: database - base: - # Removed for brevity - patches: - - fromFieldPath: metadata.annotations - toFieldPath: metadata.annotations -``` - -For more information on using `function-patch-and-transform` to patch -resources refer to the -[Function Patch and Transform]({{}}) -documentation. - ### Composition selection Select a specific Composition for a composite resource to use with