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

Split Kubernetes Model into smaller jars corresponding to each apiGroup #2108

Closed
rohanKanojia opened this issue Apr 3, 2020 · 0 comments · Fixed by #2137
Closed

Split Kubernetes Model into smaller jars corresponding to each apiGroup #2108

rohanKanojia opened this issue Apr 3, 2020 · 0 comments · Fixed by #2137
Assignees

Comments

@rohanKanojia
Copy link
Member

Right now our model has lots of classes and if we add Sundrio helper classes too they become a lot. @iocanel checked out number of classes generated and these were his findings:

It contains:
- 38 Resource definitions for Kuberntes 
- 20 Resource definitions for Openshift

These objects include properties of around 578 different types.
We do generate 3 classes for each to satisfy the builder needs (Fluent, FluentImpl & Builder).

Which takes us close to 2312 classes.

To support nesting in builder we also use nested classes (should be 2 nested classes per `buildable` property). In total there should be around 5000 of those.

The remaining 2000 classes, could possibly be considered part of optional features, and these are the only classes we could possibly get rid of (by restricting the model DSL).

But we don't always need all the classes in most of the cases. This seems to be creating problems in Quarkus Kubernetes Client Extension where the build is taking too much time on JDK11.

As per discussions in Quarkus channel, we should probably split kubernetes model into several modules each specific to an apiVersion in Kubernetes. So in the end kubernetes-model would consist of several small modules like this:

  <modules>
       <module>kubernetes-model-openshift</module>
       <module>kubernetes-model-admission-v1beta1</module>
       <module>kubernetes-model-apps-v1</module>
       <module>kubernetes-model-batch-v1</module>
       <module>kubernetes-model-networking-v1</module>
       <module>kubernetes-model-storage-v1</module>
       <module>kubernetes-model-storage-v1beta1</module>
       <module>kubernetes-model-apimachinery-meta-v1</module>
       <module>kubernetes-model-networking-v1</module>
       <module>kubernetes-model-autoscaling-v1</module>
       
       ...
  </modules>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 7, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 8, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 8, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 9, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 9, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 10, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 13, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 14, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 14, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 15, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 16, 2020
manusa pushed a commit to manusa/kubernetes-client that referenced this issue Apr 16, 2020
manusa added a commit to manusa/kubernetes-client that referenced this issue Apr 16, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 16, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 16, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 16, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 16, 2020
rohanKanojia pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 16, 2020
rohanKanojia pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 17, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 17, 2020
rohanKanojia pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 17, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 23, 2020
rohanKanojia pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 23, 2020
rohanKanojia pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants