Skip to content

Commit

Permalink
Merge pull request #29100 from geoand/#29096
Browse files Browse the repository at this point in the history
Register all implementation of ExtensionAdapter in k8s client extension
  • Loading branch information
geoand authored Nov 9, 2022
2 parents 97f6616 + 98f02aa commit 02c6ff1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.VersionInfo;
import io.fabric8.kubernetes.client.Watcher;
import io.fabric8.kubernetes.client.extension.ExtensionAdapter;
import io.fabric8.kubernetes.client.http.HttpClient;
import io.fabric8.kubernetes.client.impl.KubernetesClientImpl;
import io.fabric8.kubernetes.internal.KubernetesDeserializer;
Expand Down Expand Up @@ -222,6 +223,9 @@ public void process(ApplicationIndexBuildItem applicationIndex, CombinedIndexBui
// Register the default HttpClient implementation
serviceProviderProducer.produce(new ServiceProviderBuildItem(
HttpClient.Factory.class.getName(), "io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory"));

serviceProviderProducer.produce(ServiceProviderBuildItem.allProvidersFromClassPath(ExtensionAdapter.class.getName()));

// Enable SSL support by default
sslNativeSupport.produce(new ExtensionSslNativeSupportBuildItem(Feature.KUBERNETES_CLIENT));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

import org.jboss.jandex.DotName;

import io.fabric8.kubernetes.client.extension.ExtensionAdapter;
import io.fabric8.openshift.client.DefaultOpenShiftClient;
import io.fabric8.openshift.client.impl.NamespacedOpenShiftExtensionAdapter;
import io.fabric8.openshift.client.impl.OpenShiftClientImpl;
import io.fabric8.openshift.client.impl.OpenShiftExtensionAdapter;
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.arc.deployment.IgnoreSplitPackageBuildItem;
import io.quarkus.deployment.Feature;
Expand Down Expand Up @@ -58,12 +55,6 @@ public void process(BuildProducer<ReflectiveClassBuildItem> reflectiveClasses,
.produce(new ReflectiveClassBuildItem(true, true, OpenShiftClientImpl.class.getName()));
reflectiveClasses
.produce(new ReflectiveClassBuildItem(true, true, DefaultOpenShiftClient.class.getName()));

// Register the default OpenShift ExtensionAdapter implementations
serviceProviderProducer.produce(new ServiceProviderBuildItem(
ExtensionAdapter.class.getName(), OpenShiftExtensionAdapter.class.getName()));
serviceProviderProducer.produce(new ServiceProviderBuildItem(
ExtensionAdapter.class.getName(), NamespacedOpenShiftExtensionAdapter.class.getName()));
}

@BuildStep
Expand Down

0 comments on commit 02c6ff1

Please sign in to comment.