Skip to content

Commit 9e81488

Browse files
committed
Drop mention of connection details in composition
We might remove connection details from XRs in v2. Skip it for now. Signed-off-by: Nic Cope <[email protected]>
1 parent fe1bc63 commit 9e81488

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

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

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -272,62 +272,6 @@ spec:
272272
# Removed for brevity
273273
```
274274

275-
### Store connection details
276-
277-
Some managed resources generate unique details like usernames, passwords, IP
278-
addresses, ports or other connection details.
279-
280-
When resources inside a Composition create connection details Crossplane creates
281-
a Kubernetes secret object for each managed resource generating connection
282-
details.
283-
284-
#### Composed resource secrets
285-
286-
Inside the `spec` of each resource producing connection details, define the
287-
`writeConnectionSecretToRef`, with a `namespace` and `name` of the secret object
288-
for the resource.
289-
290-
If a `writeConnectionSecretToRef` isn't defined, Crossplane doesn't write any
291-
keys to the secret.
292-
293-
```yaml {label="writeConnRes"}
294-
apiVersion: apiextensions.crossplane.io/v1
295-
kind: Composition
296-
spec:
297-
writeConnectionSecretsToNamespace: other-namespace
298-
mode: Pipeline
299-
pipeline:
300-
- step: patch-and-transform
301-
functionRef:
302-
name: function-patch-and-transform
303-
input:
304-
apiVersion: pt.fn.crossplane.io/v1beta1
305-
kind: Resources
306-
resources:
307-
- name: key
308-
base:
309-
apiVersion: iam.aws.upbound.io/v1beta1
310-
kind: AccessKey
311-
spec:
312-
forProvider:
313-
# Removed for brevity
314-
writeConnectionSecretToRef:
315-
namespace: docs
316-
name: key1
317-
```
318-
319-
Crossplane saves a secret with the `name` in the `namespace` provided.
320-
321-
```shell {label="viewComposedSec"}
322-
kubectl get secrets -n docs
323-
NAME TYPE DATA AGE
324-
key1 connection.crossplane.io/v1alpha1 4 4m30s
325-
```
326-
327-
{{<hint "tip" >}}
328-
Remember to create a unique name for each secret.
329-
{{< /hint >}}
330-
331275
## Test a composition
332276

333277
You can preview the output of any composition using the Crossplane CLI. You

0 commit comments

Comments
 (0)