-
Notifications
You must be signed in to change notification settings - Fork 218
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
improve: simpler api for adding additional CRD file #2574
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ public class CRDMappingInTestExtensionIT { | |
LocallyRunOperatorExtension operator = | ||
LocallyRunOperatorExtension.builder() | ||
.withReconciler(new TestReconciler()) | ||
.withCRDMapping("tests.crd.example", "src/test/crd/test.crd") | ||
.withAdditionalCRD("src/test/resources/crd/test.crd") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was explicitly not put in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, isn't it trivial? I would rather stick with this, but no strong opinion, if you insist I can change it back. |
||
.build(); | ||
|
||
@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.
This should handle better weird cases: if there are more than just one resource in the file, if the CRD is not a v1 spec, if the resource in the file is not a CRD are the most obvious cases where this might fail.
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.
Update it to handle more CRD in file. I don't think we should support other CRD version that v1, note that this is not the resource definition version inside, CRD api version itself is stable for very long time. (In actual kubernetes release oldel versions are not even supported)
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.
Yes but the APT version of the CRD generator generates v1beta1 as well (and in fact, you can see that these versions are generated in our tests). It would actually be useful not to generate the v1beta1 version to save some time on the tests since we have a lot of CRDs to generate.
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.
Yes, agree, we should fix that, thus not generate those anymore.