-
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
Fix CRD-Generator tests and examples #2612
Fix CRD-Generator tests and examples #2612
Conversation
Signed-off-by: Bernhard Strähle <bernhard.straehle@gmail.com>
baca27b
to
5c1b637
Compare
@@ -43,7 +43,7 @@ void correctlyAppliesManuallySpecifiedCRD() { | |||
@Group("crd.example") | |||
@Version("v1") | |||
@Kind("Test") | |||
private static class TestCR extends CustomResource<Void, Void> implements Namespaced { | |||
public static class TestCR extends CustomResource<Void, Void> implements Namespaced { |
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.
Is this change necessary? I think we used different visibility on purpose to check if this was possible to do…
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.
I'm currently looking into this. It was somehow necessary in this project to get it working on my machine.
It's possible that this is a not yet known "breaking" change.
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.
Found the root cause here https://github.com/fabric8io/kubernetes-client/blob/main/crd-generator/api-v2/src/main/java/io/fabric8/crdv2/generator/CustomResourceInfo.java#L168
getDeclaredConstructor()
does only work with public classes.
@@ -7,5 +7,5 @@ | |||
|
|||
@Group("sample.javaoperatorsdk") | |||
@Version("v1") | |||
class TestCustomResource extends CustomResource<Void, Void> implements Namespaced { | |||
public class TestCustomResource extends CustomResource<Void, Void> implements Namespaced { |
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.
Same as above
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.
Merging as-is so that we can trigger CI on the "main" PR and check things.
Fix CRD-Generator tests and examples for #2540
See also fabric8io/kubernetes-client#6683
/cc @metacosm