Skip to content

crossplane-cuefn

A Crossplane v2 composition function that renders Kubernetes resources from CUE modules distributed over an OCI registry, paired with cuefn, an operator CLI that turns one CUE module into a versioned Crossplane Configuration.

What it does

A platform author writes one CUE module that holds both halves of a platform API:

  • a closed schema for the composite resource's spec (#API / #Spec / optional #Status), and
  • a transform that renders the desired Kubernetes objects from that spec plus any merged EnvironmentConfig.

That single module is the source of truth for two outputs:

  • At authoring time, the cuefn CLI translates the module's schema to a structural XRD and packages it — with a Composition wired to the function — as an installable Crossplane Configuration.
  • At runtime, the composition function pulls the same module from the OCI registry and evaluates it against each composite resource (XR), returning the rendered objects as Crossplane desired resources and a patched status.

Define the platform API once, in CUE; publish the module and the generated Configuration; install it and instantiate XRs.

Where to go next

CONTRIBUTING.md covers the development workflow, the toolchain, and the supply-chain layer.