Skip to content

v0.2.0

Pre-release
Pre-release

Choose a tag to compare

@jbw976 jbw976 released this 01 Apr 10:40
4af14c5

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