fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift
http://fabric8.io
Apache License 2.0
3.41k stars 1.46k forks source link

Not found the VerticalPodAutoscaler extension dependency Class #4073

Closed qhh0205 closed 2 years ago

qhh0205 commented 2 years ago

hi, guys, i have seen that client v5.10.0 has support VerticalPodAutoscaler resource operation, but when i use v5.11.0 in pom, still not found the related Class, the following is my pom.xml config:

<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client</artifactId>
    <version>5.11.0</version>
</dependency>

the following is the error that not found the related Class: image

rohanKanojia commented 2 years ago

@qhh0205 : It's available in this dependency:

<dependency>
  <groupId>io.fabric8</groupId>
  <artifactId>verticalpodautoscaler-client</artifactId>
  <version>5.12.2</version>
  <type>bundle</type>
</dependency>
qhh0205 commented 2 years ago

@qhh0205 : It's available in this dependency:

<dependency>
  <groupId>io.fabric8</groupId>
  <artifactId>verticalpodautoscaler-client</artifactId>
  <version>5.12.2</version>
  <type>bundle</type>
</dependency>

@rohanKanojia Hi, i have a try just now, but still error, cant download the package: image

rohanKanojia commented 2 years ago

strange, I can see it available in maven central : https://repo1.maven.org/maven2/io/fabric8/verticalpodautoscaler-client/5.12.2/

Could this be due to some restriction from your internal network proxy?

qhh0205 commented 2 years ago

strange, I can see it available in maven central : https://repo1.maven.org/maven2/io/fabric8/verticalpodautoscaler-client/5.12.2/

Could this be due to some restriction from your internal network proxy?

@rohanKanojia This is my maven repository config:

<repository>
    <id>central-repos1</id>
    <name>Central Repository 2</name>
    <url>https://repo1.maven.org/maven2/</url>
</repository>
qhh0205 commented 2 years ago

@rohanKanojia In other words, fabric8 client and VerticalPodAutoscaler extension client are independent and not integrated, they are different model , is that right?

rohanKanojia commented 2 years ago

Yes, it's a different dependency. By using verticalpodautoscaler-client you should also get kubernetes-client since it's included by the former dependency.

qhh0205 commented 2 years ago

strange, I can see it available in maven central : https://repo1.maven.org/maven2/io/fabric8/verticalpodautoscaler-client/5.12.2/

Could this be due to some restriction from your internal network proxy?

@rohanKanojia hi, not network prolem, resolved by adding the maven-bundle-plugin, maybe verticalpodautoscaler-client is a bundle dependency, so that needs this maven plugin, thanks:

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <extensions>true</extensions>
</plugin>
qhh0205 commented 2 years ago

Resolved, thanks @rohanKanojia !

qhh0205 commented 2 years ago
<dependency>
  <groupId>io.fabric8</groupId>
  <artifactId>verticalpodautoscaler-client</artifactId>
  <version>5.12.2</version>
  <type>bundle</type>
</dependency>

Hi, @rohanKanojia , I'm here again, the issue related to this issue: Des the versions of fabric8 client and VerticalPodAutoscaler extension client need to be consistent? At present, my fabric8 client is version 4.10.3 and VerticalPodAutoscaler extension client is version 5.10.0. I find that there are many compatibility problems, and the previous code can't work. Any suggestions on compatibility?

manusa commented 2 years ago

Des the versions of fabric8 client and VerticalPodAutoscaler extension client need to be consistent?

For major versions they must. For 5.x minor versions you can have different versions starting on one of 5.x releases (I can't remember which one right now)