Skip to content

Commit a8176fb

Browse files
committed
Mostly show v2 style MRs in MRD docs
Signed-off-by: Nic Cope <[email protected]>
1 parent da67f96 commit a8176fb

File tree

4 files changed

+99
-57
lines changed

4 files changed

+99
-57
lines changed

content/master/guides/disabling-unused-managed-resources.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ kubectl get mrds -o jsonpath='{.items[*].spec.state}' \
124124
Notice that Crossplane didn't create any CRDs yet:
125125

126126
```shell
127-
kubectl get crds | grep ec2.aws.crossplane.io
127+
kubectl get crds | grep ec2.aws.m.crossplane.io
128128
# No output - CRDs don't exist until MRDs are activated
129129
```
130130

@@ -140,9 +140,9 @@ metadata:
140140
name: my-app-resources
141141
spec:
142142
activate:
143-
- instances.ec2.aws.crossplane.io # EC2 instances for compute
144-
- securitygroups.ec2.aws.crossplane.io # Security groups for networking
145-
- vpcs.ec2.aws.crossplane.io # VPCs for isolation
143+
- instances.ec2.aws.m.crossplane.io # EC2 instances for compute
144+
- securitygroups.ec2.aws.m.crossplane.io # Security groups for networking
145+
- vpcs.ec2.aws.m.crossplane.io # VPCs for isolation
146146
```
147147

148148
Save this as `activation-policy.yaml` and apply it:
@@ -162,18 +162,18 @@ Check that Crossplane activated only the specified resources:
162162
kubectl get mrds \
163163
-o jsonpath='{range .items[*]}{.metadata.name}: {.spec.state}{"\n"}{end}' \
164164
| grep Active
165-
# instances.ec2.aws.crossplane.io: Active
166-
# securitygroups.ec2.aws.crossplane.io: Active
167-
# vpcs.ec2.aws.crossplane.io: Active
165+
# instances.ec2.aws.m.crossplane.io: Active
166+
# securitygroups.ec2.aws.m.crossplane.io: Active
167+
# vpcs.ec2.aws.m.crossplane.io: Active
168168
169169
# Verify Crossplane created corresponding CRDs
170-
kubectl get crds | grep ec2.aws.crossplane.io
171-
# instances.ec2.aws.crossplane.io
172-
# securitygroups.ec2.aws.crossplane.io
173-
# vpcs.ec2.aws.crossplane.io
170+
kubectl get crds | grep ec2.aws.m.crossplane.io
171+
# instances.ec2.aws.m.crossplane.io
172+
# securitygroups.ec2.aws.m.crossplane.io
173+
# vpcs.ec2.aws.m.crossplane.io
174174
175175
# Count CRDs from EC2 provider - should match activated MRDs
176-
kubectl get crds | grep ec2.aws.crossplane.io | wc -l
176+
kubectl get crds | grep ec2.aws.m.crossplane.io | wc -l
177177
# 3 (only the activated resources)
178178
```
179179

content/master/guides/implementing-safe-start.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ kubectl get mrds
181181
# All should show STATE: Inactive
182182

183183
# No CRDs should exist yet
184-
kubectl get crds | grep yourprovider.io
184+
kubectl get crds | grep yourprovider.m.crossplane.io
185185
# Should return no results
186186

187187
# Create activation policy
@@ -192,15 +192,15 @@ metadata:
192192
name: test-activation
193193
spec:
194194
activate:
195-
- "myresource.yourprovider.io"
195+
- "myresource.yourprovider.m.crossplane.io"
196196
EOF
197197

198198
# Verify activation worked
199-
kubectl get mrd myresource.yourprovider.io
199+
kubectl get mrd myresource.yourprovider.m.crossplane.io
200200
# Should show STATE: Active
201201

202202
# CRD should now exist
203-
kubectl get crd myresource.yourprovider.io
203+
kubectl get crd myresource.yourprovider.m.crossplane.io
204204
```
205205

206206
## Troubleshooting

content/master/managed-resources/managed-resource-activation-policies.md

Lines changed: 79 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ metadata:
5454
name: aws-core-resources
5555
spec:
5656
activate:
57-
- buckets.s3.aws.crossplane.io
58-
- instances.rds.aws.crossplane.io
59-
- "*.ec2.aws.crossplane.io" # All EC2 resources
57+
- buckets.s3.aws.m.crossplane.io # Modern v2 style S3 buckets
58+
- instances.rds.aws.m.crossplane.io # Modern v2 style RDS instances
59+
- "*.ec2.aws.m.crossplane.io" # All modern v2 style EC2 resources
6060
```
6161
6262
When you apply this MRAP, Crossplane activates the specified S3 Bucket, RDS
@@ -80,9 +80,9 @@ Specify complete MRD names for precise control:
8080
```yaml
8181
spec:
8282
activate:
83-
- buckets.s3.aws.crossplane.io
84-
- databases.rds.aws.crossplane.io
85-
- clusters.eks.aws.crossplane.io
83+
- buckets.s3.aws.m.crossplane.io
84+
- databases.rds.aws.m.crossplane.io
85+
- clusters.eks.aws.m.crossplane.io
8686
```
8787
8888
### Wildcard patterns
@@ -92,28 +92,70 @@ Use `*` wildcards to match multiple resources:
9292
```yaml
9393
spec:
9494
activate:
95-
- "*.s3.aws.crossplane.io" # All S3 resources
96-
- "*.ec2.aws.crossplane.io" # All EC2 resources
97-
- "*.rds.aws.crossplane.io" # All RDS databases
95+
- "*.s3.aws.m.crossplane.io" # All S3 resources
96+
- "*.ec2.aws.m.crossplane.io" # All EC2 resources
97+
- "*.rds.aws.m.crossplane.io" # All RDS databases
9898
```
9999

100100
{{<hint "important">}}
101101
MRAPs use prefix-only wildcards, not full regular expressions. Only `*` at
102-
the beginning of a pattern works (for example, `*.s3.aws.crossplane.io`).
103-
Patterns like `s3.*.aws.crossplane.io` or `*.s3.*` aren't valid.
102+
the beginning of a pattern works (for example, `*.s3.aws.m.crossplane.io`).
103+
Patterns like `s3.*.aws.m.crossplane.io` or `*.s3.*` aren't valid.
104104
{{</hint>}}
105105

106106
{{<hint "tip">}}
107107
You can mix exact names and wildcards for flexible activation:
108108
```yaml
109109
spec:
110110
activate:
111-
- buckets.s3.aws.crossplane.io # Exact S3 buckets
112-
- "*.ec2.aws.crossplane.io" # All EC2 resources
113-
- clusters.eks.aws.crossplane.io # Exact EKS clusters
111+
- buckets.s3.aws.m.crossplane.io # Exact S3 buckets
112+
- "*.ec2.aws.m.crossplane.io" # All EC2 resources
113+
- clusters.eks.aws.m.crossplane.io # Exact EKS clusters
114114
```
115115
{{</hint>}}
116116

117+
## Legacy and modern resource versions
118+
119+
Crossplane v2 supports two styles of managed resources:
120+
121+
- **Modern v2 style** (recommended): Use `*.m.crossplane.io` domains for
122+
namespaced managed resources with better isolation and security
123+
- **Legacy v1 style**: Use `*.crossplane.io` domains for cluster-scoped
124+
managed resources (maintained for backward compatibility)
125+
126+
### Activating modern resources
127+
128+
Most examples in this guide use modern v2 style resources:
129+
130+
```yaml
131+
spec:
132+
activate:
133+
- buckets.s3.aws.m.crossplane.io # Modern v2 S3 bucket
134+
- "*.ec2.aws.m.crossplane.io" # All modern v2 EC2 resources
135+
```
136+
137+
### Activating legacy resources
138+
139+
To activate legacy v1 style resources, use patterns without `.m`:
140+
141+
```yaml
142+
spec:
143+
activate:
144+
- buckets.s3.aws.crossplane.io # Legacy v1 S3 bucket
145+
- "*.ec2.aws.crossplane.io" # All legacy v1 EC2 resources
146+
```
147+
148+
### Mixed activation
149+
150+
You can activate both modern and legacy resources in the same MRAP:
151+
152+
```yaml
153+
spec:
154+
activate:
155+
- "*.aws.m.crossplane.io" # All modern AWS resources
156+
- "*.aws.crossplane.io" # All legacy AWS resources
157+
```
158+
117159
## Common activation strategies
118160

119161
### Activate everything (default behavior)
@@ -140,7 +182,7 @@ helm install crossplane crossplane-stable/crossplane \
140182
# Or provide custom default activations
141183
helm install crossplane crossplane-stable/crossplane \
142184
--set provider.defaultActivations={\
143-
"*.s3.aws.crossplane.io","*.ec2.aws.crossplane.io"}
185+
"*.s3.aws.m.crossplane.io","*.ec2.aws.m.crossplane.io"}
144186
```
145187

146188
### Provider-specific activation
@@ -169,10 +211,10 @@ metadata:
169211
name: storage-and-compute
170212
spec:
171213
activate:
172-
- "*.s3.aws.crossplane.io" # AWS S3 resources
173-
- "*.ec2.aws.crossplane.io" # AWS EC2 resources
174-
- "*.storage.gcp.crossplane.io" # GCP Storage resources
175-
- "*.compute.gcp.crossplane.io" # GCP Compute resources
214+
- "*.s3.aws.m.crossplane.io" # AWS S3 resources
215+
- "*.ec2.aws.m.crossplane.io" # AWS EC2 resources
216+
- "*.storage.gcp.m.crossplane.io" # GCP Storage resources
217+
- "*.compute.gcp.m.crossplane.io" # GCP Compute resources
176218
```
177219

178220
### Minimal activation
@@ -186,9 +228,9 @@ metadata:
186228
name: minimal-footprint
187229
spec:
188230
activate:
189-
- buckets.s3.aws.crossplane.io # Just S3 buckets
190-
- instances.ec2.aws.crossplane.io # Just EC2 instances
191-
- databases.rds.aws.crossplane.io # Just RDS databases
231+
- buckets.s3.aws.m.crossplane.io # Just S3 buckets
232+
- instances.ec2.aws.m.crossplane.io # Just EC2 instances
233+
- databases.rds.aws.m.crossplane.io # Just RDS databases
192234
```
193235

194236
<!-- vale Google.Headings = NO -->
@@ -212,8 +254,8 @@ metadata:
212254
name: storage-team
213255
spec:
214256
activate:
215-
- "*.s3.aws.crossplane.io"
216-
- "*.storage.gcp.crossplane.io"
257+
- "*.s3.aws.m.crossplane.io"
258+
- "*.storage.gcp.m.crossplane.io"
217259
---
218260
# Database team MRAP
219261
apiVersion: apiextensions.crossplane.io/v1alpha1
@@ -222,8 +264,8 @@ metadata:
222264
name: database-team
223265
spec:
224266
activate:
225-
- "*.rds.aws.crossplane.io"
226-
- "*.sql.gcp.crossplane.io"
267+
- "*.rds.aws.m.crossplane.io"
268+
- "*.sql.gcp.m.crossplane.io"
227269
```
228270

229271
### Configuration package activation
@@ -238,10 +280,10 @@ metadata:
238280
name: web-platform-dependencies
239281
spec:
240282
activate:
241-
- buckets.s3.aws.crossplane.io # For static assets
242-
- instances.ec2.aws.crossplane.io # For web servers
243-
- databases.rds.aws.crossplane.io # For application data
244-
- certificates.acm.aws.crossplane.io # For HTTPS
283+
- buckets.s3.aws.m.crossplane.io # For static assets
284+
- instances.ec2.aws.m.crossplane.io # For web servers
285+
- databases.rds.aws.m.crossplane.io # For application data
286+
- certificates.acm.aws.m.crossplane.io # For HTTPS
245287
```
246288

247289
<!-- vale Google.Headings = NO -->
@@ -291,12 +333,12 @@ status:
291333
status: "True"
292334
reason: Running
293335
activated:
294-
- buckets.s3.aws.crossplane.io
295-
- instances.ec2.aws.crossplane.io
296-
- instances.rds.aws.crossplane.io
297-
- securitygroups.ec2.aws.crossplane.io
298-
- subnets.ec2.aws.crossplane.io
299-
- vpcs.ec2.aws.crossplane.io
336+
- buckets.s3.aws.m.crossplane.io
337+
- instances.ec2.aws.m.crossplane.io
338+
- instances.rds.aws.m.crossplane.io
339+
- securitygroups.ec2.aws.m.crossplane.io
340+
- subnets.ec2.aws.m.crossplane.io
341+
- vpcs.ec2.aws.m.crossplane.io
300342
```
301343

302344
<!-- vale Google.Headings = NO -->
@@ -407,7 +449,7 @@ package dependencies.
407449
add wildcards only when beneficial for maintainability
408450
2. **Plan for provider evolution** - Design wildcard patterns that
409451
accommodate new resources as providers add them (for example,
410-
`*.s3.aws.crossplane.io` works for future S3 resources)
452+
`*.s3.aws.m.crossplane.io` works for future S3 resources)
411453
3. **Group related resources logically** - Create MRAPs that activate
412454
resources teams actually use together
413455
4. **Include activation dependencies in Configuration packages** -

content/master/managed-resources/managed-resource-definitions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ managing instances of that resource.
6363
apiVersion: apiextensions.crossplane.io/v1alpha1
6464
kind: ManagedResourceDefinition
6565
metadata:
66-
name: buckets.s3.aws.crossplane.io
66+
name: buckets.s3.aws.m.crossplane.io
6767
spec:
68-
group: s3.aws.crossplane.io
68+
group: s3.aws.m.crossplane.io
6969
names:
7070
kind: Bucket
7171
plural: buckets
@@ -197,7 +197,7 @@ kubectl get managedresourcedefinitions
197197
View MRD details:
198198

199199
```shell
200-
kubectl describe mrd buckets.s3.aws.crossplane.io
200+
kubectl describe mrd buckets.s3.aws.m.crossplane.io
201201
```
202202

203203
<!-- vale Google.Headings = NO -->
@@ -238,7 +238,7 @@ status:
238238
You can manually activate an MRD by changing its state:
239239

240240
```shell
241-
kubectl patch mrd buckets.s3.aws.crossplane.io --type='merge' \
241+
kubectl patch mrd buckets.s3.aws.m.crossplane.io --type='merge' \
242242
-p='{"spec":{"state":"Active"}}'
243243
```
244244

0 commit comments

Comments
 (0)