v0.3.0
Pre-releasev0.3.0 is a regular development release for function-kro. It adds support for composing native Kubernetes resources, fixes correctness issues around integer fields and schema resolution, and brings the function's input API and KRO library in line with upstream.
v1beta1 → v1alpha1) - please read the breaking changes section below before upgrading.
🎉 Highlights
-
Compose native Kubernetes resources: function-kro can now compose built-in Kubernetes types like
Deployment,Service, andSecreton all supported versions of Crossplane. OpenAPI schemas for core types are generated and bundled into the function, so this works even on Crossplane versions beforev2.2.0that don't support theRequiredSchemascapability. Added in #26, thank you @jonasz-lasut! -
Integer-typed fields now resolve correctly: Fixed a bug where integer-typed observed fields (and
x-kubernetes-int-or-stringfields holding integers) failed to resolve in templates and status expressions. Crossplane delivers observed state over gRPC, where every JSON number arrives as afloat64, but KRO expected theint64it would get reading from the API server. function-kro now round-trips observed state through the same decoder the API server uses, so whole numbers come back asint64. This is what lets the newexample/appaggregate aDeployment'savailableReplicasinto an integerstatus.replicas. Reported on Slack and fixed in #68. -
No more silent deletion of composed resources on empty schema responses: When Crossplane responded to the function's schema requirements but none of the responses contained usable schemas, the function previously returned an empty response that Crossplane could interpret as "delete the existing composed resources." This total-failure case now returns a fatal error instead, so your resources are left intact while the underlying schema problem is surfaced. Fixed in #59.
-
Input types sourced directly from upstream KRO: function-kro now imports
Resource,ExternalRef,ForEachDimension, and related types directly from thegithub.com/kubernetes-sigs/kromodule rather than maintaining local copies (#49), and the KRO library was bumped tov0.9.2(#74). New fields and fixes from upstream KRO now flow in automatically when the dependency is bumped, keeping function-kro closer to upstream feature parity.
🚨 Warnings and breaking changes
Input API version changed from v1beta1 to v1alpha1
As part of sourcing input types directly from upstream KRO (#49), the function's input type moved from kro.fn.crossplane.io/v1beta1 to kro.fn.crossplane.io/v1alpha1, reflecting the input API's maturity: it is no more mature than the KRO project it tracks. The body schema is unchanged.
apiVersion:
input:
apiVersion: kro.fn.crossplane.io/v1alpha1 # was: kro.fn.crossplane.io/v1beta1
kind: ResourceGraph
# ...You can roll this out without disrupting running workloads: the function reads only the input body and ignores its apiVersion, so XRs whose Compositions still declare v1beta1 keep reconciling across the upgrade. But v1beta1 is gone from the CRD, so update your Compositions to the supported version.
Upgrading on Crossplane < 2.2: delete the stale input CRD
This affects Crossplane versions before 2.2 only (verified on 2.1.6). Older Crossplane installs the function's input CRD, so upgrading the package in place over a v0.2.x install leaves the new revision stuck (HEALTHY=False):
cannot establish control of object: CustomResourceDefinition.apiextensions.k8s.io
"resourcegraphs.kro.fn.crossplane.io" is invalid: status.storedVersions[0]: Invalid value: "v1beta1":
missing from spec.versions; v1beta1 was previously a storage version, and must remain in spec.versions
until a storage migration ensures no data remains persisted in v1beta1 and removes v1beta1 from status.storedVersions
Kubernetes refuses to drop a stored CRD version that might still have data behind it. There is none to migrate here: ResourceGraph inputs live inline inside your Compositions, never as standalone cluster resources, so the CRD holds no v1beta1 objects. Delete it and let Crossplane recreate it fresh at v1alpha1:
kubectl delete crd resourcegraphs.kro.fn.crossplane.ioThe revision recreates the CRD and goes HEALTHY=True within a minute, with no further action needed.
Upgrading on Crossplane >= 2.2: nothing to do
Crossplane 2.2 stopped installing function input CRDs, since they are documentation-only (crossplane/crossplane #6976, resolving #5294), so the conflict never arises (verified on 2.3.2). The upgrade completes cleanly on its own; there is no CRD to delete, and kubectl delete crd resourcegraphs.kro.fn.crossplane.io would return NotFound.
What's Changed
- docs: include new omit and collections limits examples in README table by @jbw976 in #36
- build: add github workflows for backports by @jbw976 in #37
- chore: remove stale patches docs and reduce upstream diff surface by @jbw976 in #40
- chore: bump examples to use v0.2.0 by @jbw976 in #42
- refactor(fn): factor RunFunction into focused helpers by @jbw976 in #44
- Generate core types oapi schemas by @jonasz-lasut in #26
- ci: add check-diff job and harden workflow permissions by @jbw976 in #48
- Use upstream KRO API types directly, rename input to v1alpha1 by @jbw976 in #49
- fix(deps): update golang.org/x/exp digest to 746e56f by @renovate[bot] in #17
- fix(deps): update k8s.io/kube-openapi digest to 16be699 by @renovate[bot] in #18
- chore(deps): update examples by @renovate[bot] in #22
- chore(config): migrate Renovate config by @renovate[bot] in #50
- fix(deps): update k8s.io/utils digest to 28399d8 by @renovate[bot] in #21
- fix(deps): update kubernetes monorepo to v0.35.3 by @renovate[bot] in #24
- fix(deps): update module github.com/crossplane/function-sdk-go to v0.6.2 by @renovate[bot] in #28
- fix(deps): update module sigs.k8s.io/release-utils to v0.12.4 by @renovate[bot] in #32
- chore(deps): update docker/build-push-action action to v7 by @renovate[bot] in #33
- chore(deps): update korthout/backport-action action to v4.3.0 by @renovate[bot] in #51
- fix(deps): update module sigs.k8s.io/controller-runtime to v0.23.3 by @renovate[bot] in #25
- fix(deps): update module sigs.k8s.io/controller-tools to v0.20.1 by @renovate[bot] in #29
- fix(deps): update module github.com/google/cel-go to v0.28.0 by @renovate[bot] in #52
- fix(deps): update module github.com/alecthomas/kong to v1 by @renovate[bot] in #58
- fix(deps): update k8s.io/kube-openapi digest to ec9c827 by @renovate[bot] in #54
- Return fatal error when schema resolution gets empty response by @jbw976 in #59
- fix(fn): decode observed state as the API server does so integers resolve by @jbw976 in #68
- chore(deps): update docker/login-action action to v4 by @renovate[bot] in #53
- chore(deps): update docker/setup-buildx-action action to v4 by @renovate[bot] in #55
- chore(deps): update docker/setup-qemu-action action to v4 by @renovate[bot] in #56
- chore(deps): update github artifact actions (major) by @renovate[bot] in #57
- chore(deps): update examples by @renovate[bot] in #63
- ci: pin GitHub Action digests and enable semantic commits in Renovate by @jbw976 in #71
- fix(deps): update kubernetes monorepo to v0.36.2 by @renovate[bot] in #60
- chore(deps): update korthout/backport-action action to v4.5.2 by @renovate[bot] in #62
- fix(deps): update module github.com/crossplane/crossplane-runtime/v2 to v2.3.2 by @renovate[bot] in #61
- chore(deps): pin dependencies by @renovate[bot] in #72
- chore(deps): update actions/checkout digest to df4cb1c by @renovate[bot] in #69
- fix(deps): update k8s.io/kube-openapi digest to 865597e by @renovate[bot] in #64
- fix(deps): update module github.com/google/cel-go to v0.28.1 by @renovate[bot] in #73
- fix(deps): update golang.org/x/exp digest to c48552f by @renovate[bot] in #67
- fix(deps): update k8s.io/utils digest to ff6756f by @renovate[bot] in #70
- fix(deps): update module github.com/kubernetes-sigs/kro to v0.9.2 by @renovate[bot] in #74
- fix(deps): update module sigs.k8s.io/controller-runtime to v0.24.1 by @renovate[bot] in #75
- fix(deps): update module sigs.k8s.io/controller-tools to v0.21.0 by @renovate[bot] in #76
- chore: add claude codes worktree path to gitignore by @jbw976 in #77
- docs: clarify the package-health check in the test-examples skill by @jbw976 in #78
New Contributors
- @jonasz-lasut made their first contribution in #26
- @renovate[bot] made their first contribution in #17
Full Changelog: v0.2.0...v0.3.0