generated from crossplane/function-template-go
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathcomposition.yaml
More file actions
34 lines (34 loc) · 1.09 KB
/
composition.yaml
File metadata and controls
34 lines (34 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: example
spec:
compositeTypeRef:
apiVersion: example.crossplane.io/v1beta1
kind: XR
mode: Pipeline
pipeline:
- step: create-a-bucket
functionRef:
name: function-go-templating
input:
apiVersion: gotemplating.fn.crossplane.io/v1beta1
kind: GoTemplate
source: Inline
inline:
template: |
apiVersion: s3.aws.upbound.io/v1beta1
kind: Bucket
metadata:
annotations:
gotemplating.fn.crossplane.io/composition-resource-name: bucket
spec:
forProvider:
region: {{ .observed.composite.resource.spec.region }}
# If the above Bucket becomes ready, this function will mark the XR as ready.
# crossplane beta render doesn't support showing whether an XR is ready, so
# unfortunately you'll have to trust that this is working.
# See https://github.com/crossplane/crossplane/issues/4810.
- step: automatically-detect-ready-composed-resources
functionRef:
name: function-auto-ready