forked from crossplane-contrib/function-go-templating
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomposition.yaml
More file actions
25 lines (25 loc) · 805 Bytes
/
composition.yaml
File metadata and controls
25 lines (25 loc) · 805 Bytes
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
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: example-function-to-yaml
spec:
compositeTypeRef:
apiVersion: example.crossplane.io/v1beta1
kind: XR
mode: Pipeline
pipeline:
- step: render-templates
functionRef:
name: function-go-templating
input:
apiVersion: gotemplating.fn.crossplane.io/v1beta1
kind: GoTemplate
source: Inline
inline:
template: |
---
apiVersion: {{ .observed.composite.resource.apiVersion }}
kind: {{ .observed.composite.resource.kind }}
status:
# Copy the whole 'complexDictionary' as is by fomatting it as yaml
dummy: {{ .observed.composite.resource.spec.complexDictionary | toYaml | nindent 7 }}