From c722b9d18ab81e041e990c0229ac4a51a0bc585d Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 7 Nov 2022 18:44:18 +0200 Subject: [PATCH] Register all implementation of ExtensionAdapter in k8s client extension Fixes: #29096 (cherry picked from commit 98f02aa969263f28f30613663bb628c929a681dd) --- .../client/deployment/KubernetesClientProcessor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/KubernetesClientProcessor.java b/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/KubernetesClientProcessor.java index 85a765326f28f..55ddc34fafa13 100644 --- a/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/KubernetesClientProcessor.java +++ b/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/KubernetesClientProcessor.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; +import io.fabric8.kubernetes.client.ExtensionAdapter; import io.quarkus.arc.deployment.AdditionalBeanBuildItem; import io.quarkus.deployment.Capabilities; import io.quarkus.deployment.Capability; @@ -32,6 +33,7 @@ import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem; import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem; +import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; import io.quarkus.deployment.util.JandexUtil; import io.quarkus.jackson.deployment.IgnoreJsonDeserializeClassBuildItem; import io.quarkus.kubernetes.client.runtime.KubernetesClientBuildConfig; @@ -85,7 +87,8 @@ public void process(ApplicationIndexBuildItem applicationIndex, CombinedIndexBui BuildProducer reflectiveClasses, BuildProducer reflectiveHierarchies, BuildProducer ignoredJsonDeserializationClasses, - BuildProducer roleBindingProducer) { + BuildProducer roleBindingProducer, + BuildProducer serviceProviderProducer) { featureProducer.produce(new FeatureBuildItem(Feature.KUBERNETES_CLIENT)); if (kubernetesClientConfig.generateRbac) { @@ -201,6 +204,8 @@ public void process(ApplicationIndexBuildItem applicationIndex, CombinedIndexBui log.debugv("Model Classes:\n{0}", String.join("\n", modelClasses)); } + serviceProviderProducer.produce(ServiceProviderBuildItem.allProvidersFromClassPath(ExtensionAdapter.class.getName())); + // Enable SSL support by default sslNativeSupport.produce(new ExtensionSslNativeSupportBuildItem(Feature.KUBERNETES_CLIENT)); }