-
Notifications
You must be signed in to change notification settings - Fork 203
Prevent generated types from colliding with Resources #236
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
Prevent generated types from colliding with Resources #236
Conversation
Signed-off-by: Aaron Eaton <[email protected]>
Hi @AaronME. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
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 @AaronME !
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.
👍
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AaronME, jaypipes, muvaf The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Aaron Eaton [email protected]
Issue #, if available: crossplane-contrib/provider-aws#876
Description of changes:
It is possible to have a name collision between a Crossplane Managed Resource and a generated type based on a resource's fields. A good example of this is the SecurityGroup type, which is both a Managed Resource and a generated type.
Whichever type is declared in the highest apiVersion will become the "storage version" for the given type.
For SecurityGroup, this has no impact, because the Managed Resource is version
v1beta1
and the generated type is only in lower versions.But for the proposed Route resource, the Managed Resources is
v1alpha1
and a generated type exists inv1beta1
, resulting inv1beta1
becoming the storage version. Because the storage version is generated, it lacks crossplane required fieldsstatus
andsynced
.Marking all generated types with
// +kubebuilder:skipversion
will prevent them from becoming the storage version for a Managed Resource of the same name.