Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register all implementation of ExtensionAdapter in k8s client extension #29100

Merged
merged 1 commit into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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