Example function showcasing how you can use Crossplane Composition Functions to orchestrate your IDP's Control Plane
Needed Tools:
- Crossplane CLI
- IDPBuilder
- GoLang
- Kubernetes CLI
- Docker
To Test and Build Locally
# Run code generation - see input/generate.go
$ go generate ./...
# Run tests - see fn_test.go
$ go test ./...
# Build the function's runtime image - see Dockerfile
$ docker build . --tag=runtime
# Build a function package - see package/crossplane.yaml
$ crossplane xpkg build -f package --embed-runtime-image=runtimeTo Test the output of the function based on a given Composite Resource
crossplane beta render ./example/xr.yaml ./example/composition.yaml ./example/functions.yamlTo Spin up your local IDP control plane pointing to a localstack instance.
idpbuilder create -p ./local/localstackTo apply a claim to validate the behavior of your Composition Function locally
kubectl apply -f example/claims/s3bucket.yaml