Skip to content

Commit

Permalink
[quarkusio#22367] Explicitly register io.fabric8.kubernetes.client.Ve…
Browse files Browse the repository at this point in the history
…rsionInfo class for reflection
  • Loading branch information
scrocquesel committed Dec 18, 2021
1 parent 98a0ac0 commit c31b378
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ public void process(ApplicationIndexBuildItem applicationIndex, CombinedIndexBui
.produce(new ReflectiveClassBuildItem(true, false, "io.fabric8.kubernetes.api.model.IntOrString"));
reflectiveClasses
.produce(new ReflectiveClassBuildItem(true, false, "io.fabric8.kubernetes.internal.KubernetesDeserializer"));
reflectiveClasses
.produce(new ReflectiveClassBuildItem(true, true, "io.fabric8.kubernetes.client.VersionInfo"));

if (log.isDebugEnabled()) {
final String watchedClassNames = watchedClasses
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package io.quarkus.it.kubernetes.client;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;

import io.fabric8.kubernetes.client.KubernetesClient;

@Path("/version")
public class Version {

private final KubernetesClient kubernetesClient;

public Version(KubernetesClient kubernetesClient) {
this.kubernetesClient = kubernetesClient;
}

@GET
public Response version() {
return Response.ok(kubernetesClient.getKubernetesVersion().getPlatform()).build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public void testInteractionWithAPIServer() {

RestAssured.when().post("/pod/test").then()
.body(containsString("54321"));

RestAssured.when().get("/version").then()
.statusCode(200);
}

@Test
Expand Down

0 comments on commit c31b378

Please sign in to comment.