add an example for claiming existing xr

Signed-off-by: Manabu Mccloskey <manabu.mccloskey@gmail.com>
This commit is contained in:
Manabu Mccloskey 2023-06-12 10:28:30 -06:00
parent d3ebe1f2bf
commit 38ec341d4e
1 changed files with 12 additions and 0 deletions

View File

@ -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