Skip to content
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

Consider splitting OpenShift Client module (GraalVM performance) #5592

Closed
manusa opened this issue Nov 16, 2023 · 5 comments
Closed

Consider splitting OpenShift Client module (GraalVM performance) #5592

manusa opened this issue Nov 16, 2023 · 5 comments
Labels
component/openshift-client Deals with the openshift-client component/openshift-model Deals with Red Hat OpenShift Model discussion status/stale

Comments

@manusa
Copy link
Member

manusa commented Nov 16, 2023

Description

When creating a native image for a Java application that has a dependency to the io.fabric8:openshift-client module, it's likely that the GraalVM process runs into an java.lang.OutOfMemoryError (OOME).

The openshift-client module brings transitive dependencies to every openshift-model-* module. In addition, it provides DSL entrypoint methods in the OpenShiftClient interface, inevitably linking the classes from those modules.

We've got a couple of huge model modules. The most concerning one is io.fabric8:openshift-model-operator. When processing this model types, GraalVM runs out of memory unless we provide higher limits. This is problematic for memory-constrained environments such as continuous integration (CI) systems.

Adding manual exclusions to the model modules is not possible, since the DSL accessors prevents this modules from being optional.

Possible solutions

  • Remove the DSL entrypoints for openshift-model-operator from OpenShiftClient (module will be optional)
  • Remove the DSL entrypoints and dependency from openshift-client (module will be opt-in and only accessible with client.resource methods)
  • Provide a standalone client for operator (just like any other extension)
  • ...

Relates to

/cc @jamesnetherton

@manusa manusa added discussion component/openshift-client Deals with the openshift-client component/openshift-model Deals with Red Hat OpenShift Model labels Nov 16, 2023
@manusa manusa self-assigned this Nov 22, 2023
@manusa manusa moved this to Planned in Eclipse JKube Nov 22, 2023
@manusa manusa moved this from Planned to In Progress in Eclipse JKube Nov 22, 2023
@shawkins
Copy link
Contributor

There was also an older issue about making the openshift support similar to other extensions - however I couldn't quite get there because there was too much usage of internal logic by the openshift module.

@manusa
Copy link
Member Author

manusa commented Nov 22, 2023

I'm going to try and provide a fix (exclusively) for Quarkus in the scope of this issue.

We can further discuss more suitable and generic approaches if the one for Quarkus works.

Copy link

stale bot commented Feb 22, 2024

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

@manusa
Copy link
Member Author

manusa commented May 2, 2024

After the fixes in Quarkus and Fabric8:

This might not be needed anymore.

The final binary size is now reasonable enough. The added complexity to provide multiple clients for OpenShift-specific models might not be cost-effective.

Copy link

stale bot commented Aug 3, 2024

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

@stale stale bot added the status/stale label Aug 3, 2024
@stale stale bot closed this as completed Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/openshift-client Deals with the openshift-client component/openshift-model Deals with Red Hat OpenShift Model discussion status/stale
Projects
None yet
Development

No branches or pull requests

2 participants