Skip to content

Releases: crossplane-contrib/function-kro

v0.2.1

13 Apr 10:33
1789706

Choose a tag to compare

v0.2.1 Pre-release
Pre-release

v0.2.1 is a patch release that focuses on issues reported by users of function-kro.

🚨 Highlights

Kubernetes Core Type Support

In previous releases running on versions of Crossplane before v2.2, function-kro could only compose resources that had Custom Resource Definitions (CRDs) — provider-managed resources like AWS VPCs, RDS instances, etc.. Native Kubernetes types such as Secrets, ConfigMaps, and Deployments could not be composed because they don't have CRDs, and the function had no way to resolve their OpenAPI schemas.

function-kro now supports composing native Kubernetes types on any version of Crossplane v2.

The function now ships with pre-compiled OpenAPI schemas for the core API groups (core/v1, apps/v1, batch/v1, rbac.authorization.k8s.io/v1, networking.k8s.io/v1, and others). You simply define a native Kubernetes resource in your ResourceGraph the same way you would any other resource — CEL expressions, readiness conditions, and all — and function-kro handles the rest transparently on all versions of Crossplane v2.

A big thank you to @jonasz-lasut for driving this feature!

What's Changed

  • [Backport release-0.2] chore: remove stale patches docs and reduce upstream diff surface by @github-actions[bot] in #41
  • [Backport release-0.2] chore: bump examples to use v0.2.0 by @github-actions[bot] in #43
  • [Backport release-0.2] Generate core types oapi schemas by @github-actions[bot] in #47

Full Changelog: v0.2.0...release-0.2

v0.2.0

01 Apr 10:40
4af14c5

Choose a tag to compare

v0.2.0 Pre-release
Pre-release

The v0.2.0 release is a regular release that focuses on bringing the latest upstream KRO v0.9.0 experience to Crossplane users. This release picks up a significant set of new user-facing features from upstream KRO, expands test and example coverage, and introduces new tooling to keep our adaptation layer maintainable as both projects evolve.

Full release notes from KRO v0.9.0 that give more details about the new features can be found in https://github.com/kubernetes-sigs/kro/releases/tag/v0.9.0.

🎉 Highlights

External collection references

Building on the single external reference support from v0.1.0, you can now select multiple external resources using label selectors. This is useful for aggregating data from a dynamic set of resources — for example, collecting notification subscriber information from all ConfigMaps matching a label. The label values themselves support CEL expressions (e.g., ${schema.metadata.name}), so the selector can dynamically match resources for the specific XR instance.

omit() CEL function (alpha)

The omit() function lets you conditionally remove a field from the desired state entirely, rather than setting it to a zero value. This distinction matters for Server-Side Apply (SSA) — when a field is absent from the desired state, Crossplane does not claim ownership of it, allowing provider defaults or other controllers to manage it independently. Enable it with --feature-gates=CELOmitFunction=true on the function deployment, as shown in https://github.com/crossplane-contrib/function-kro/blob/main/example/drc.yaml.

Collection size limits

Collections (forEach) are powerful, but unbounded expansion can be dangerous. This release adds a configurable guardrail via --rgd-max-collection-size that caps how many resources a single collection can create. When the limit is exceeded, the function returns a fatal error rather than silently creating a large number of resources.

New CEL libraries

KRO v0.9.0 brings several new CEL libraries that are now available in your resource templates:

  • json.marshal() / json.unmarshal() — serialize and deserialize JSON within CEL expressions
  • maps.merge() — merge multiple maps together
  • lists.setAtIndex() / lists.insertAtIndex() — list manipulation functions
  • quantity — Kubernetes resource quantity operations (from the k8s CEL library)
  • random.seededInt() — deterministic random number generation with a seed value

Agent skills and upgrade process for maintainability

We aim for function-kro to be maintainable by is keeping our adaptation layer minimal and maintainable as upstream KRO evolves (until we have worked with the KRO maintainers and community to take the changes we need back upstream 😉). This release improves our tooling introduces tooling and process to make that sustainable.

  • End-to-end example validation (/test-examples) — a new skill that spins up a kind cluster with Crossplane and AWS providers, runs every example from the README, and makes automated pass/fail assertions. This gives us confidence that upstream features work through the full Crossplane pipeline, not just in unit tests.
  • Improved upgrade process skills — the /audit-patches and /review-kro-adaptations skills were refined during the v0.9.0 upgrade, our first full exercise of the upstream upgrade process. The audit now validates our patches documentation against the actual upstream diff, and the review assesses minimality of every adaptation.

Test and example coverage

  • New fn_test.go unit test scenarios covering omit() field removal and collection size limit enforcement
  • New working examples with full walkthroughs for omit and collection limits, bringing the total to 7 end-to-end examples: basic, conditionals, readiness, external references (single + collection), collections, omit, and collection limits
  • All examples validated end-to-end against real AWS resources via the /test-examples skill

⚠️ Known limitations

  • omit() is alpha and feature-gated. You must explicitly enable it via --feature-gates=CELOmitFunction=true on the function's DeploymentRuntimeConfig as shown in the examples. The API and behavior may change in future KRO releases.
  • No reactive watches on external references. Upstream KRO v0.9.0 added reactive watches that re-reconcile instances instantly when an external resource changes. function-kro fetches external refs via Crossplane's required resources, which does not support watches. Changes to external resources are picked up on the next reconciliation cycle, driven by the function's TTL or other events that trigger XR reconciliation.

What's Changed

  • docs: include NOTICE file from upstream KRO by @jbw976 in #27
  • Upgrade to kro v0.9.0 by @jbw976 in #34
  • [Backport release-0.2] build: add github workflows for backports by @github-actions[bot] in #38
  • [Backport release-0.2] docs: include new omit and collections limits examples in README table by @github-actions[bot] in #39

New Contributors

  • @github-actions[bot] made their first contribution in #38

Full Changelog: v0.1.0...v0.2.0

v0.1.0

18 Mar 18:41
8b4823a

Choose a tag to compare

v0.1.0 Pre-release
Pre-release

This is the first public release of function-kro, a Crossplane composition function for declarative resource orchestration. It adapts KRO's approach to run inside Crossplane, letting you combine CEL-based resource definitions with other Crossplane functions in a single pipeline.

There is no need to install KRO itself — function-kro natively embeds KRO's graph builder, CEL evaluator, and runtime engine with full feature parity.

If you already have KRO resource definitions, the resources and status blocks are identical to what you'd write in a standalone KRO ResourceGraphDefinition — they drop into the pipeline input without changes.

See the project README for more information about this function, how to use it, and example manifests to get you started.

We welcome contributions to this function from anyone!

What's Changed

  • Crossplane Render setup by @ytsarev in #3
  • WIP by @negz in #2
  • Function works end-to-end by @negz in #6
  • Fix XR desired state to avoid SSA field ownership conflicts by @jbw976 in #7
  • Support for KRO v0.8 with full feature parity by @jbw976 in #10
  • examples: point examples to upbound/function-kro:v0.0.1 by @jbw976 in #11
  • Update collection item naming and add unit test coverage for all features by @jbw976 in #12
  • add new agent skills to audit our KRO adaptations, improve agentic upgrade process, code quality improvements from audit by @jbw976 in #13
  • bump examples to v0.0.2 by @jbw976 in #14
  • docs: make basic example subnet availability zones variable by @jbw976 in #15
  • README: polish information and context for main README by @jbw976 in #16
  • Update repo assets after crossplane-contrib donation by @jbw976 in #23

New Contributors

  • @ytsarev made their first contribution in #3
  • @negz made their first contribution in #2
  • @jbw976 made their first contribution in #7

Full Changelog: https://github.com/crossplane-contrib/function-kro/commits/v0.1.0