Skip to content

Decouple Java class construction from frameworks #71

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

Open
OneCricketeer opened this issue Jan 28, 2022 · 9 comments
Open

Decouple Java class construction from frameworks #71

OneCricketeer opened this issue Jan 28, 2022 · 9 comments
Assignees
Labels
priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@OneCricketeer
Copy link

Feature Request

Describe the problem you need a feature to resolve.

It seems the only way to use this is to rely on some additional Quarkus boilerplate (at least a properties file)

Describe the solution you'd like.

I'd like to just construct some POJOs from operator-sdk without needing to additionally cleanup extraneous resources that aren't required if I am not interested in using Quarkus.

@OneCricketeer
Copy link
Author

The "quarkus app-type" generator could construct a multi-module project that depends on the proposed "model" classes

@metacosm
Copy link
Collaborator

metacosm commented Feb 1, 2022

Out of curiosity, are you planning on using any other framework or do you plan on using plain Java?

@OneCricketeer
Copy link
Author

Currently using Spring, but I don't expect to be needing Autowire annotations or anything like that.

@metacosm
Copy link
Collaborator

metacosm commented Feb 1, 2022

Gotcha… that said, using the Quarkus extension doesn't really forces you into using any Quarkus-specific code but you do get some stuff for free, i.e. you only need to write your Reconciler but I can understand how that might still be an issue for folks.

@OneCricketeer
Copy link
Author

OneCricketeer commented Feb 1, 2022

So, I already have an operator generated from Golang operator-sdk

I found this repo while searching for this solution, thinking it was the same idea rather than just having this repo be a sort of project initializer

@csviri
Copy link

csviri commented Feb 2, 2022

Having some target environment / framework flag probably might help. Also the generator could be integrated.

I idea was the same, just the implemented features are not there yet.

@metacosm
Copy link
Collaborator

metacosm commented Feb 2, 2022

OK, so the idea is to port your operator to Java? It would be interesting to hear about your use case if you could talk about it, that is :)

@OneCricketeer
Copy link
Author

@metacosm No, at least, not that I've heard. We have it written and deployed from the Go model, but have a Java API layer that constructs CRD payload representations, passes them around on some message queues, writes them to databases, etc. We currently are copying attributes between the two models manually, thus why I was searching for code generation utilities.

@jmrodri jmrodri added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Feb 3, 2022
@jmrodri jmrodri self-assigned this Feb 3, 2022
@jmrodri
Copy link
Member

jmrodri commented Feb 10, 2022

@OneCricketeer we'd love to hear your feedback about a plain java or Spring based operator. We do have plans in the future to add other types of Java project generations, that's why this project is plural: java-operator-plugins but our first focus was using Quarkus extension and targeting Quarkus. If you would like to help add plain Java or some other flavor, we'd love to work with you on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

4 participants