-
Notifications
You must be signed in to change notification settings - Fork 108
Generate crossplane v2 providers #518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+2,245
−8,421
Conversation
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
This PR is a no-op when I run it on provider-upjet-aws. It generates exactly the same code as before this PR. My goal is to allow invoking the main apis/controllers loop twice. Once for cluster scoped and once for namespaced resources. I'll do that in a follow-up PR. Signed-off-by: Nic Cope <nicc@rk0n.org>
This is mostly a case of finding hard coded paths and assumptions and making them configurable. Signed-off-by: Nic Cope <nicc@rk0n.org>
Also take into account if there is a main.go template file when generating controller setup and provider main.go files. There will be no template in the monolith case, meaning we shoud generate a consolidated controller setup and shouldn't generate main.go files for each group. Signed-off-by: Jared Watts <jbw976@gmail.com>
… namespaced config 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>
…y scenario Signed-off-by: Jared Watts <jbw976@gmail.com>
- namespaced MR Go structs now inline v2-style ManagedResourceSpec in the type template as a result: - writeConnectionSecretToRef becomes a local secret ref in namespaced MRs - providerConfigRef becomes a typed reference with kind included - deletionPolicy gets removed in namespaced MRs - publishConnectionDetailsTo gets removed from all MRs Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
…mespaced MRs - inject namespace to the local secret ref if MR is namespaced - cross-namespace secret refs are effectively not allowed for namespaced MRs Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
update sensitive tests update types builder tests add tests for FileProducer connection secret ref resolution add namespaced tests for api callbacks Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
sergenyalcin
approved these changes
Aug 1, 2025
Member
sergenyalcin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @erhancagirici for your tremendous effort for upjet v2!
|
@erhancagirici @sergenyalcin |
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
Generate namespace-friendly Go structs for namespaced MR types
v2.ManagedResourceSpecin MR Go types. This effectively makes:spec.writeConnectionSecretToRef: connection secret refs as local references (without namespace)spec.deletionPolicyfrom MR specsspec.publishConnectionDetailsTospec.forProvidergithub.com/crossplane-runtime/v2/...SetupGatedfunctions for controllers, that allows CRD gated safe-start controller setup.resolvertooling ast parsing for imports.addresses:
crossplane/crossplane#6457
crossplane/crossplane#6472
crossplane/crossplane#6460
crossplane/crossplane#6530
I have:
make reviewableto ensure this PR is ready for review.backport release-x.ylabels to auto-backport this PR if necessary.How has this code been tested