io.quarkus.kubernetes.client.deployment.KubernetesClientBuildStep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-kubernetes-client-internal-deployment Show documentation
Show all versions of quarkus-kubernetes-client-internal-deployment Show documentation
This module only exists as a separate module so the kubernetes extension can share code with the kubernetes-client extension
package io.quarkus.kubernetes.client.deployment;
import static io.quarkus.kubernetes.client.runtime.KubernetesClientUtils.createConfig;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.QuarkusBuildCloseablesBuildItem;
import io.quarkus.kubernetes.client.runtime.KubernetesClientBuildConfig;
import io.quarkus.kubernetes.client.runtime.QuarkusHttpClientFactory;
import io.quarkus.kubernetes.client.spi.KubernetesClientBuildItem;
public class KubernetesClientBuildStep {
private KubernetesClientBuildConfig buildConfig;
@BuildStep
public KubernetesClientBuildItem process(QuarkusBuildCloseablesBuildItem closeablesBuildItem) {
QuarkusHttpClientFactory httpClientFactory = new QuarkusHttpClientFactory();
closeablesBuildItem.add(httpClientFactory);
return new KubernetesClientBuildItem(createConfig(buildConfig), httpClientFactory);
}
}