Skip to content

Commit

Permalink
Exclude VertxHttpClientFactory in favour of QuarkusHttpClientFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
Sgitario committed Mar 3, 2023
1 parent f14cb40 commit 34264c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.RemovedResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem;
Expand All @@ -53,6 +54,7 @@
import io.quarkus.kubernetes.client.runtime.KubernetesClientProducer;
import io.quarkus.kubernetes.client.runtime.KubernetesConfigProducer;
import io.quarkus.kubernetes.spi.KubernetesRoleBindingBuildItem;
import io.quarkus.maven.dependency.ArtifactKey;

public class KubernetesClientProcessor {

Expand Down Expand Up @@ -88,6 +90,13 @@ public void nativeImageSupport(BuildProducer<RuntimeReinitializedClassBuildItem>
.produce(new RuntimeReinitializedClassBuildItem(io.fabric8.kubernetes.client.utils.Utils.class.getName()));
}

@BuildStep
RemovedResourceBuildItem unregisterVertHttpClient() {
// Exclude VertxHttpClientFactory in favour of QuarkusHttpClientFactory
return new RemovedResourceBuildItem(ArtifactKey.fromString("io.fabric8:kubernetes-httpclient-vertx"),
Collections.singleton("META-INF/services/io.fabric8.kubernetes.client.http.HttpClient$Factory"));
}

@BuildStep
public void process(ApplicationIndexBuildItem applicationIndex, CombinedIndexBuildItem combinedIndexBuildItem,
KubernetesClientBuildConfig kubernetesClientConfig,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.quarkus.kubernetes.client.runtime.QuarkusHttpClientFactory

0 comments on commit 34264c2

Please sign in to comment.