Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
This PR upgrades
crossplane-runtimefrom v2.1.0-rc.0 to v2.1.0-rc.1 and addresses compatibility issuesintroduced 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.1github.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
rendercommand propagatenamespaces from XRs to all composed resources. However, it doesn't check whether resources are cluster-scoped,
causing validation errors.
This function:
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:
SetComposedResourceMetadata()in Crossplane's render.go:455-457 blindly propagatesnamespaces without checking scope
crd.Spec.Scopebefore setting namespacesexplicitly
Testing
Notes for Reviewers
Fixes #
I have:
earthly +reviewableto ensure this PR is ready for review.- [ ] Linked a PR or a docs tracking issue to document this change.- [ ] Followed the API promotion workflow if this PR introduces, removes, or promotes an API.Need help with this checklist? See the cheat sheet.