function-template-go/example
Nic Cope 44b3fc66df Add an example directory
This is mostly useful to prompt function authors to have an example
directory, rather than to exercise the template code.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-10-31 23:39:02 -07:00
..
README.md Add an example directory 2023-10-31 23:39:02 -07:00
composition.yaml Add an example directory 2023-10-31 23:39:02 -07:00
functions.yaml Add an example directory 2023-10-31 23:39:02 -07:00
xr.yaml Add an example directory 2023-10-31 23:39:02 -07:00

README.md

Example manifests

You can run your function locally and test it using crossplane beta render with these example manifests.

# Run the function locally
$ go run . --insecure --debug
# Then, in another terminal, call it with these example manifests
$ crossplane beta render xr.yaml composition.yaml functions.yaml -r
---
apiVersion: example.crossplane.io/v1
kind: XR
metadata:
  name: example-xr
---
apiVersion: render.crossplane.io/v1beta1
kind: Result
message: I was run with input "Hello world"!
severity: SEVERITY_NORMAL
step: run-the-template