Skip to content

Commit 2b766dc

Browse files
committed
Use namespaced XRs in examples
Also don't use xMyDatabase as a kind - it's not a valid kind... Signed-off-by: Nic Cope <[email protected]>
1 parent 32ce91f commit 2b766dc

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

content/v2.0-preview/composition/composite-resources.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ creates a custom API endpoint
4545
apiVersion: apiextensions.crossplane.io/v1
4646
kind: CompositeResourceDefinition
4747
metadata:
48-
name: xmydatabases.example.org
48+
name: mydatabases.example.org
4949
spec:
5050
group: example.org
5151
names:
52-
kind: xMyDatabase
53-
plural: xmydatabases
52+
kind: MyDatabase
53+
plural: mydatabases
5454
# Removed for brevity
5555
```
5656

@@ -67,7 +67,7 @@ metadata:
6767
spec:
6868
compositeTypeRef:
6969
apiVersion: example.org/v1alpha1
70-
kind: xMyDatabase
70+
kind: MyDatabase
7171
# Removed for brevity
7272
```
7373

@@ -102,8 +102,9 @@ resource.
102102

103103
```yaml {label="annotation",copy-lines="none"}
104104
apiVersion: example.org/v1alpha1
105-
kind: xMyDatabase
105+
kind: MyDatabase
106106
metadata:
107+
namespace: default
107108
name: my-composite-resource
108109
annotations:
109110
crossplane.io/external-name: my-custom-name
@@ -167,8 +168,9 @@ section of the Composition documentation.
167168

168169
```yaml {label="compref",copy-lines="none"}
169170
apiVersion: example.org/v1alpha1
170-
kind: xMyDatabase
171+
kind: MyDatabase
171172
metadata:
173+
namespace: default
172174
name: my-composite-resource
173175
spec:
174176
compositionRef:
@@ -185,8 +187,9 @@ provide one or more Composition labels to match.
185187

186188
```yaml {label="complabel",copy-lines="none"}
187189
apiVersion: example.org/v1alpha1
188-
kind: xMyDatabase
190+
kind: MyDatabase
189191
metadata:
192+
namespace: default
190193
name: my-composite-resource
191194
spec:
192195
compositionSelector:
@@ -215,8 +218,9 @@ resources from automatically upgrading.
215218

216219
```yaml {label="comprev",copy-lines="none"}
217220
apiVersion: example.org/v1alpha1
218-
kind: xMyDatabase
221+
kind: MyDatabase
219222
metadata:
223+
namespace: default
220224
name: my-composite-resource
221225
spec:
222226
compositionUpdatePolicy: Manual
@@ -239,8 +243,9 @@ desired Composition revision.
239243

240244
```yaml {label="comprevref",copy-lines="none"}
241245
apiVersion: example.org/v1alpha1
242-
kind: xMyDatabase
246+
kind: MyDatabase
243247
metadata:
248+
namespace: default
244249
name: my-composite-resource
245250
spec:
246251
compositionUpdatePolicy: Manual
@@ -271,8 +276,9 @@ section provide one or more Composition revision labels to match.
271276

272277
```yaml {label="comprevsel",copy-lines="none"}
273278
apiVersion: example.org/v1alpha1
274-
kind: xMyDatabase
279+
kind: MyDatabase
275280
metadata:
281+
namespace: default
276282
name: my-composite-resource
277283
spec:
278284
compositionRevisionSelector:
@@ -293,8 +299,9 @@ To pause a composite resource apply the
293299

294300
```yaml {label="pause",copy-lines="none"}
295301
apiVersion: example.org/v1alpha1
296-
kind: xMyDatabase
302+
kind: MyDatabase
297303
metadata:
304+
namespace: default
298305
name: my-composite-resource
299306
annotations:
300307
crossplane.io/paused: "true"
@@ -317,7 +324,7 @@ Use `kubectl get` for the specific custom API endpoint to view
317324
only those resources.
318325

319326
```shell {copy-lines="1"}
320-
kubectl get xMyDatabase.example.org
327+
kubectl get mydatabases
321328
NAME SYNCED READY COMPOSITION AGE
322329
my-composite-resource True True my-composition 12m
323330
```
@@ -333,8 +340,9 @@ and unique managed resources created in the
333340
```yaml {copy-lines="1",label="desccomposite"}
334341
kubectl describe composite my-composite-resource
335342
Name: my-composite-resource
343+
Namespace: default
336344
API Version: example.org/v1alpha1
337-
Kind: xMyDatabase
345+
Kind: MyDatabase
338346
Spec:
339347
Composition Ref:
340348
Name: my-composition
@@ -374,7 +382,7 @@ composite, creating a reference between the managed resource and owning
374382
composite resource.
375383

376384
```shell {label="complabel",copy-lines="1"}
377-
kubectl describe xmydatabase.example.org/my-database-x9rx9
385+
kubectl describe mydatabase.example.org/my-database-x9rx9
378386
Name: my-database2-x9rx9
379387
Namespace:
380388
Labels: crossplane.io/composite=my-database-x9rx9

content/v2.0-preview/composition/compositions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ created.
301301
```yaml
302302
---
303303
apiVersion: example.crossplane.io/v1
304-
kind: XBucket
304+
kind: Bucket
305305
metadata:
306306
name: example-render
307307
---
@@ -317,7 +317,7 @@ metadata:
317317
- apiVersion: example.crossplane.io/v1
318318
blockOwnerDeletion: true
319319
controller: true
320-
kind: XBucket
320+
kind: Bucket
321321
name: example-render
322322
uid: ""
323323
spec:
@@ -334,7 +334,7 @@ The `xr.yaml` file contains the composite resource to render:
334334

335335
```yaml
336336
apiVersion: example.crossplane.io/v1
337-
kind: XBucket
337+
kind: Bucket
338338
metadata:
339339
name: example-render
340340
spec:
@@ -352,7 +352,7 @@ metadata:
352352
spec:
353353
compositeTypeRef:
354354
apiVersion: example.crossplane.io/v1
355-
kind: XBucket
355+
kind: Bucket
356356
mode: Pipeline
357357
pipeline:
358358
- step: patch-and-transform
@@ -575,7 +575,7 @@ sends it to the composition function as part of the observed state.
575575

576576
```yaml
577577
apiVersion: example.crossplane.io/v1
578-
kind: XBucket
578+
kind: Bucket
579579
metadata:
580580
name: example-render
581581
spec:
@@ -687,7 +687,7 @@ metadata:
687687
spec:
688688
compositeTypeRef:
689689
apiVersion: example.crossplane.io/v1
690-
kind: XBucket
690+
kind: Bucket
691691
mode: Pipeline
692692
pipeline:
693693
- step: patch-and-transform

0 commit comments

Comments
 (0)