Kubernetes-client: Missing kubernetes model classes

Created on 9 Jul 2020  路  7Comments  路  Source: fabric8io/kubernetes-client

Am trying to wrap kubernetes-client, openshift-client, and kubernetes-model as OSGi bundles, and I found out that simple wrapping wouldn't work as you have extra dependencies and stuff, and especially that the kubernetes-model jar contains nothing but a reference to itself in the maven subfolder in its manifest folder.

Testing revealed that model classes like Pod, Deployment, etc. are nowhere present in the compiled jars, and I just wonder what magic should be behind for all this stuff to work.

I found, under platform folder, you have a feature for karaf listing dependencies, so perhaps you can give me a hint where to look to obtain the model jar without generating it?

Please advise..

question

Most helpful comment

All 7 comments

Why are wrapping them as plain jar if they are already bundles? Use them as bundles.

@oscerd, it turns out that by Maven coordinates provided in the readme on the front page, they appear to be just plain jars, and examining their contents confirms the same - they don't have anything like normal OSGi bundle manifest like importing/exporting packages, etc. These guys are effectively plain jars, not OSGi bundles.

Well, those bundles, at the link you provided, are actually bundles. But those provided at project home, e.g. io.fabric8:kubernetes-client:4.10.2, are not. So are you suggesting me to grab all those specified in that feature. Which of them contain classes like Pod, or Deployment?

I found these two references in the feature manifest you linked me to:
mvn:io.fabric8/kubernetes-client/${kubernetes-client-version}/jar/bundle
mvn:io.fabric8/openshift-client/${kubernetes-client-version}/jar/bundle

How this can be translated into normal maven coordinates, do you know?

The manifest found in the jar file @ io.fabric8:kubernetes-client:4.10.2 looks like this:
Manifest-Version: 1.0
Build-Jdk-Spec: 1.8
Created-By: Maven Jar Plugin 3.2.0

It contains nothing like a valid OSGi bundle jar should contain, like export/import packages, bundle name and version, etc. And it obviously lacks the kubernetes model classes, like Pod, Deployment, etc.

Looks like kubernetes-model-core is what I need, so will grab dependencies as listed there. Thanks for the hint.

Was this page helpful?
0 / 5 - 0 ratings