Skip to content

Commit

Permalink
feat(kubernetes-client): allow incomplete model classpath
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Nov 10, 2023
1 parent c59ee9a commit 10b2dfc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.quarkus.kubernetes.client.deployment;

import java.util.Collections;

import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.nativeimage.NativeImageAllowIncompleteClasspathBuildItem;
import io.quarkus.runtime.configuration.ConfigUtils;

public class NativeOverrides {

private static final String KUBERNETES_ALLOW_INCOMPLETE_MODEL = "quarkus.kubernetes-client.allow-incomplete-model";

@BuildStep
NativeImageAllowIncompleteClasspathBuildItem incompleteModel() {
if (ConfigUtils.getFirstOptionalValue(Collections.singletonList(KUBERNETES_ALLOW_INCOMPLETE_MODEL), Boolean.class)
.orElse(false)) {
return new NativeImageAllowIncompleteClasspathBuildItem("quarkus-kubernetes-client");
}
return null;
}
}
4 changes: 4 additions & 0 deletions integration-tests/kubernetes-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<artifactId>quarkus-integration-test-kubernetes-client</artifactId>
<name>Quarkus - Integration Tests - Kubernetes Client</name>

<properties>
<quarkus.kubernetes-client.allow-incomplete-model>true</quarkus.kubernetes-client.allow-incomplete-model>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
4 changes: 4 additions & 0 deletions integration-tests/openshift-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<artifactId>quarkus-integration-test-openshift-client</artifactId>
<name>Quarkus - Integration Tests - OpenShift Client</name>

<properties>
<quarkus.kubernetes-client.allow-incomplete-model>true</quarkus.kubernetes-client.allow-incomplete-model>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down

0 comments on commit 10b2dfc

Please sign in to comment.