From 38ec341d4e2f8fcdf34ea82b2d7291a44816051d Mon Sep 17 00:00:00 2001 From: Manabu Mccloskey Date: Mon, 12 Jun 2023 10:28:30 -0600 Subject: [PATCH] add an example for claiming existing xr Signed-off-by: Manabu Mccloskey --- content/master/concepts/composition.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/master/concepts/composition.md b/content/master/concepts/composition.md index 9121bdc2..8599d08a 100644 --- a/content/master/concepts/composition.md +++ b/content/master/concepts/composition.md @@ -1288,6 +1288,18 @@ an existing Composite Resource as long as its a type of XR that offers a claim and no one else has already claimed it. To do so: 1. Set the `spec.resourceRef` of your claim to reference the existing XR. + ```yaml + apiVersion: database.example.org/v1alpha1 + kind: PostgreSQLInstance + metadata: + name: example + namespace: default + spec: + resourceRef: + apiVersion: database.example.org/v1alpha1 + kind: XPostgreSQLInstance + name: example-d4lmv + ``` 1. Make sure the rest of your claim's spec fields match the XR's. If your claim's spec fields don't match the XR's Crossplane will still claim it