This is a minor release that ships several new configuration and runtime capabilities for upjet-based providers, together with a set of bug fixes and security-relevant dependency updates.
⚠️ Common APIs moved to github.com/crossplane/crossplane/apis/v2/core/v2 (#664)
crossplane-runtime v2.3.0 consolidated the common API types out of
crossplane-runtime/v2/apis/common/{v1,v2} into a single package, and renamed two embedded types. The API shapes stay identical.
| Before | After |
|---|---|
xpv1.ResourceSpec
| xpv2.ClusterManagedResourceSpec (cluster-scoped MRs)
|
xpv1.ResourceStatus
| xpv2.ManagedResourceStatus
|
Everything else (Reference, Selector, SecretReference, SecretKeySelector,
LocalSecretReference, LocalSecretKeySelector, NamespacedReference,
NamespacedSelector, Condition*, ManagementAction*, ManagementPolicies,
DeletionPolicy) keeps its name, only the import path changes.
To upgrade a provider:
- Bump
github.com/crossplane/crossplane-runtime/v2tov2.4.0and add a
direct require ongithub.com/crossplane/crossplane/apis/v2 v2.4.1, then
go mod tidy. The build will not compile without the direct dependency. - Run
make generate. Upjet emits the new package path and type names for all
zz_*.gofiles automatically. - ⚠️ Hand-written code importing the old
apis/common/{v1,v2}paths must be updated manually.
PackagePathXPCommonAPIs and PackagePathXPV2CommonAPIs in pkg/types now both
point at the consolidated package; they are kept as separate constants for source-level backward compatibility.
See the expanded Upjet v2 upgrade guide for the full walkthrough.
Features
config.Resource.OverrideScalarFieldType(#724) — lets provider authors
override the generated Go type for a scalar field at a given Terraform path
(e.g."x.y", wildcard segments omitted). Overriding a non-scalar path returns
a descriptive error.types.Builder.buildSchemanow honors these overrides.types.StringOrBool(#724) — a type stored canonically as a string that
also decodes from JSON booleans, backed by the new generic
internal.StringOrPrimitive[T](supports~booland all int/uint kinds).
Use it withOverrideScalarFieldTypeviatypes.NewStringOrBoolType()to
accept both"true"andtruein a CRD field without a breaking API change.
Bug fixes
- Plugin Framework: don't suppress unset-value diffs (#640) —
filteredDiffExistspreviously dropped every diff whose planned value was
null, so clearing a previously set field produced no update. Such diffs are now
kept unless the attribute (or one of its ancestors) is computed-only. - SDK v2: apply TF conversions before filtering
initProviderdiffs (#728) —
filterInitExclusiveDiffsnow runsApplyTFConversions(..., ToTerraform)on
bothspec.forProviderandspec.initProviderbefore computing the
init-exclusive key set. Without this, resources using TF conversions (e.g.
singleton-list conversions) mis-identified which keys wereinitProvider-only. - tfjson: don't infer
ComputedforSchemaNestingModeSingleblocks (#593) — theMinItems == 0 && MaxItems == 0 → Computedheuristic is
valid for SDK v2 collections but wrong for Plugin Framework single blocks,
which always leaveMin/MaxItemsat 0. Such blocks were landing in
Observationonly, never inForProvider/InitProvider. They are now always
Optionaland neverComputed.MinItems > 0blocks are correctly marked
Required. Adds unit tests fortfJSONBlockTypeToV2Schemaand
hasRequiredChild.
Documentation
- New Storage Version Migration guide (#719)
— why removing a deprecated CRD version does not rewrite objects already in
etcd, and how to handle it. - New Applying Storage Version Migration
guide (#719) — step-by-step procedure, including cleanup. - Upjet v2 upgrade guide extended with the
crossplane-runtime v2.3.x migration callout (#664).
Dependency & security updates
Full PR list
- bump crossplane-runtime and crossplane/apis to v2.3.3 by @jschoombee in #664
- Bump github.com/upbound/uptest to commit c230a8044006 by @ulucinar in #716
- Add guides for the storage version migration library by @sergenyalcin in #719
- fix: apply TF conversions before filtering initProvider-exclusive diffs by @sergenyalcin in #728
- Add config.Resource.OverrideScalarFieldType by @ulucinar in #724
- Update dependency docker/buildx to v0.36.1 by @renovate[bot] in #720
- Update go module directive to v1.26.7 by @renovate[bot] in #731
- Update github/codeql-action action to v4.37.7 by @renovate[bot] in #721
- Update negz/create-tag action to v2 by @renovate[bot] in #736
- Check for previous null values in filtered diffs by @stevendborrelli in #640
- Update module github.com/crossplane/crossplane/apis/v2 to v2.4.0 by @renovate[bot] in #744
- Update module github.com/crossplane/crossplane-runtime/v2 to v2.4.0 by @renovate[bot] in #743
- Update module google.golang.org/grpc to v1.83.1 [SECURITY] by @renovate[bot] in #747
- Update go module directive to v1.26.8 by @renovate[bot] in #745
- Update dependency docker/buildx to v0.37.0 by @renovate[bot] in #748
- Update github/codeql-action action to v4.37.9 by @renovate[bot] in #740
- Update dependency golangci/golangci-lint to v2.13.2 by @renovate[bot] in #607
- fix(tfjson): Reset Computed flag for SchemaNestingModeSingle blocks with required children by @rwwiv in #593
- Update module google.golang.org/grpc to v1.83.2 [SECURITY] by @renovate[bot] in #751
- Update github/codeql-action action to v4.38.0 by @renovate[bot] in #750
New Contributors
- @jschoombee made their first contribution in #664
- @rwwiv made their first contribution in #593
Full Changelog: v2.4.0...v2.5.0