Skip to content

Conversation

@jcogilvie
Copy link
Collaborator

@jcogilvie jcogilvie commented Nov 4, 2025

Description of your changes

This PR upgrades crossplane-runtime from v2.1.0-rc.0 to v2.1.0-rc.1 and addresses compatibility issues
introduced by upstream changes to namespace propagation in Crossplane.

Dependency Upgrades

  • ⬆️ github.com/crossplane/crossplane-runtime/v2: v2.1.0-rc.0 → v2.1.0-rc.1
  • ⬆️ github.com/crossplane/crossplane/v2: v2.0.2 → v2.1.0-rc.1 (required for compatibility)

Key Changes

1. New Workaround: removeNamespacesFromClusterScopedResources()

Crossplane PR #6812 fixed issue
#6782 by making the render command propagate
namespaces from XRs to all composed resources. However, it doesn't check whether resources are cluster-scoped,
causing validation errors.

This function:

  • Queries the cluster for each composed resource's CRD to determine scope
  • Removes namespaces from cluster-scoped resources
  • Includes detailed documentation (diff_processor.go:615-638) on the upstream fix needed

2. Removed Obsolete Workaround: propagateNamespacesToManagedResources()

The old workaround addressed issue #6782 (render not propagating namespaces), which is now fixed upstream. We no
longer need it since PR #6812 fixed the original problem.

3. Upstream Fix Documentation

Added inline documentation explaining:

  • Root cause: SetComposedResourceMetadata() in Crossplane's render.go:455-457 blindly propagates
    namespaces without checking scope
  • Proposed solution: Pass XRDs to render and check crd.Spec.Scope before setting namespaces
  • Architectural constraint: render is an offline tool with no cluster access, so needs XRDs passed
    explicitly
  • Migration path: Once upstream is fixed, we can remove our cleanup function

Testing

  • ✅ All 31 integration tests pass
  • ✅ All unit tests pass
  • ✅ Verified namespace handling for both namespaced and cluster-scoped resources

Notes for Reviewers

  • This is primarily a Renovate PR with compatibility fixes
  • The workaround is clearly marked as temporary
  • The code includes a detailed roadmap for the upstream fix needed in Crossplane

Fixes #

I have:

Need help with this checklist? See the cheat sheet.

renovate bot and others added 5 commits November 3, 2025 23:29
@jcogilvie jcogilvie marked this pull request as ready for review November 4, 2025 18:08
@jcogilvie jcogilvie changed the title Upgrade crossplane chore: Upgrade crossplane Nov 4, 2025
@jcogilvie jcogilvie merged commit eade2a3 into main Nov 4, 2025
12 checks passed
@jcogilvie jcogilvie deleted the upgrade-crossplane branch November 4, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants