From 1d4e24dc76f2f2d42884c4af1b0bb96c949e9706 Mon Sep 17 00:00:00 2001 From: Nic Cope Date: Fri, 28 Mar 2025 23:09:12 -0700 Subject: [PATCH] Drop docs on naming resources with external name annotation It's an MR feature, not a composition feature. It's documented in the MR docs. Signed-off-by: Nic Cope --- .../composition/composite-resources.md | 69 ------------------- 1 file changed, 69 deletions(-) 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