Define a Crossplane XRD and Composition using the function-patch-and-transform pipeline mode

domain: docs.crossplane.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install the function-patch-and-transform package by applying a Function resource (apiVersion: pkg.crossplane.io/v1, kind: Function, spec.package: xpkg.crossplane.io/crossplane-contrib/function-patch-and-transform:v0.8.2) and confirm it shows INSTALLED: True, HEALTHY: True with `kubectl get functions`.
  2. Define the schema with a CompositeResourceDefinition (apiVersion: apiextensions.crossplane.io/v2, kind: CompositeResourceDefinition) setting spec.scope (Namespaced or Cluster), spec.group, spec.names.kind/plural, and an openAPIV3Schema under spec.versions[].schema, then apply it and verify ESTABLISHED: True.
  3. Create a Composition (apiVersion: apiextensions.crossplane.io/v1, kind: Composition) whose spec.compositeTypeRef matches the XRD's group/version/kind, and set spec.mode: Pipeline.
  4. Add a pipeline step under spec.pipeline that references the installed function via functionRef.name, with input.apiVersion: pt.fn.crossplane.io/v1beta1, input.kind: Resources.
  5. Inside input.resources[], define each composed resource's base template, its patches (FromCompositeFieldPath, ToCompositeFieldPath, CombineFromComposite, etc.) to wire XR fields to/from the managed resource, and readinessChecks to determine when the resource is ready.
  6. Apply the Composition, create an instance of the XR, and confirm SYNCED: True / READY: True and that Crossplane created the expected composed resources with `kubectl get <xr-kind>` and `kubectl get managed`.

Known gotchas

Related routes

Create a Crossplane function pipeline Composition using function-patch-and-transform
docs.crossplane.io · 6 steps · unrated
Define a Crossplane v2 CompositeResourceDefinition (XRD) with OpenAPI schema validation and a matching Composition using pipeline mode with function-environment-configs
docs.crossplane.io · 5 steps · unrated
Use a Crossplane function pipeline with function-patch-and-transform
docs.crossplane.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans