Skip to content

Commit cc8f9df

Browse files
committed
Mention changing API versions for namespaced MRs
Signed-off-by: Nic Cope <nicc@rk0n.org>
1 parent 5255979 commit cc8f9df

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

content/master/guides/upgrade-to-crossplane-v2.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,23 @@ Existing Compositions work with Crossplane v2 with minimal changes. v2 managed
232232
resources are schematically identical to v1 managed resources - they're just
233233
namespaced.
234234

235-
To use v2 namespaced managed resources in compositions, update the API group
236-
from `.crossplane.io` to `.m.crossplane.io`:
235+
To use v2 namespaced managed resources in compositions:
236+
237+
1. **Update the API group** from `.crossplane.io` to `.m.crossplane.io`
238+
2. **Check the API version** - v2 namespaced providers often reset the API
239+
version to `v1beta1`
240+
241+
For example `provider-aws-s3:v2.0.0` has two `Bucket` MRs:
242+
243+
* `apiVersion: s3.aws.upbound.io/v1beta2` - Legacy, cluster scoped
244+
* `apiVersion: s3.aws.m.upbound.io/v1beta1` - Namespaced
245+
246+
The `spec.forProvider` and `status.atProvider` fields are schematically
247+
identical.
248+
249+
{{<hint "note">}}
250+
Use `kubectl get mrds` to see available MR API versions.
251+
{{</hint>}}
237252

238253
**Before (v1 cluster-scoped)**:
239254
```yaml
@@ -256,7 +271,7 @@ spec:
256271
source: Inline
257272
inline:
258273
template: |
259-
apiVersion: s3.aws.crossplane.io/v1beta1
274+
apiVersion: s3.aws.crossplane.io/v1beta2
260275
kind: Bucket
261276
metadata:
262277
name: {{ .observed.composite.resource.metadata.name }}
@@ -286,7 +301,7 @@ spec:
286301
source: Inline
287302
inline:
288303
template: |
289-
apiVersion: s3.aws.m.crossplane.io/v1beta1 # Added .m
304+
apiVersion: s3.aws.m.crossplane.io/v1beta1 # Added .m, reset to v1beta1
290305
kind: Bucket
291306
metadata:
292307
name: {{ .observed.composite.resource.metadata.name }}

0 commit comments

Comments
 (0)