Generate namespaced managed resources#1751
Closed
jbw976 wants to merge 31 commits intocrossplane-contrib:crossplane-v2from
Closed
Generate namespaced managed resources#1751jbw976 wants to merge 31 commits intocrossplane-contrib:crossplane-v2from
jbw976 wants to merge 31 commits intocrossplane-contrib:crossplane-v2from
Conversation
Signed-off-by: Nic Cope <nicc@rk0n.org>
It doesn't fit well in apis given it also generates controllers, commands, etc. Signed-off-by: Nic Cope <nicc@rk0n.org>
Signed-off-by: Nic Cope <nicc@rk0n.org>
Ideally the code generation configuration wouldn't depend on generated code. That should be fixed in a future commit. Signed-off-by: Nic Cope <nicc@rk0n.org>
Signed-off-by: Nic Cope <nicc@rk0n.org>
Signed-off-by: Nic Cope <nicc@rk0n.org>
Using: sed -i -e 's/scope=Cluster/scope=Namespaced/' $(find . -name '*.go'|xargs) Signed-off-by: Nic Cope <nicc@rk0n.org>
Unchanged, for now. Signed-off-by: Nic Cope <nicc@rk0n.org>
This should make the namespaced APIs and controllers actually namespaced Signed-off-by: Nic Cope <nicc@rk0n.org>
Signed-off-by: Nic Cope <nicc@rk0n.org>
The controller import package is now configurable. Signed-off-by: Nic Cope <nicc@rk0n.org>
Signed-off-by: Nic Cope <nicc@rk0n.org>
Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
…o pass to upjet pipeline Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
…lly cased in singleton list handling These specific controllers were handled specially in the singleton list conversion code, since that has now been removed, their versions are bumped during code gen. Not entirely sure this is a good thing just yet, but we'll see. Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
* refactor GetProvider so that xpprovider.GetProvider() is only called once at runtime and then reused for both cluster and namespaced * update provider main.go template to use both cluster and namespaced config during start up. This is important as both of their setup, conversions, etc. need to be honored Signed-off-by: Jared Watts <jbw976@gmail.com>
Signed-off-by: Jared Watts <jbw976@gmail.com>
The CRD file names don't conflict with each other because they have their full group names embedded in the file name. When the kustomize tooling runs over the CRDs, it's easier to process them all in one single directory, so we don't end up with wierd duplicates. Signed-off-by: Jared Watts <jbw976@gmail.com>
This isn't an ideal name because it doesn't exactly match the same pattern of other groups, e.g. s3.m.aws.upbound.io, but it is a quick way to make publishing work for the family/config provider. That provider is special cased to take all aws.* CRDs. Updating the group for namespaced core/config CRDs to aws.m.upbound.io means they are also included in the family/config provider along with the cluster scoped aws.upbound.io CRDs. We should likely revisit this with more time to maybe update the up xpkg batch tooling. Signed-off-by: Jared Watts <jbw976@gmail.com>
…tory Signed-off-by: Jared Watts <jbw976@gmail.com>
…atial Signed-off-by: Jared Watts <jbw976@gmail.com>
This was referenced Mar 21, 2025
Member
Author
|
I lost the ability to push to @negz's fork/branch when I opened this new PR with my as the author. I'll open a new PR from my fork. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 continues the work from draft PR #1689 that @negz started. It essentially updates this provider to start generating namespaced managed resources in addition to cluster scoped ones, which will be featured heavily in the current proposal of Crossplane v2.
This should not be taken as a final product. This is a practical update to this provider as a proof of concept for what we think a provider could look like in Crossplane v2. There are many short cuts taken, it is not production ready, and we are very open to feedback to change directions or improve the architecture.
The work in this PR should be merged into the new
crossplane-v2branch, which is based on commit 1ecd9cb, the latest commit when we started this work. We will need to rebase this effort in the future to include latest changes frommain, but that should not block this PR.I have:
make reviewableto ensure this PR is ready for review.General steps this PR has taken
The following list describes the general process that was taken to update this provider to support namespaced MRs:
How has this code been tested
Besides generating, building and publishing successfully, this code has also been tested manually by installing the config, s3, rds, and ec2 packages into a control plane, then creating both cluster scoped and namespaced S3 buckets. Ex.: