Package io.fabric8.kubernetes.client
Class KubernetesClientBuilder
- java.lang.Object
-
- io.fabric8.kubernetes.client.KubernetesClientBuilder
-
public class KubernetesClientBuilder extends Object
If noExecutororKubernetesClientBuilder.ExecutorSupplieris specified, a defaultKubernetesClientBuilder.ExecutorSupplierwill be used which creates an unbounded cached thread pool per client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classKubernetesClientBuilder.ConfigNestedstatic interfaceKubernetesClientBuilder.ExecutorSupplier
-
Constructor Summary
Constructors Constructor Description KubernetesClientBuilder()
-
Method Summary
-
-
-
Method Detail
-
build
public KubernetesClient build()
-
withKubernetesSerialization
public KubernetesClientBuilder withKubernetesSerialization(KubernetesSerialization kubernetesSerialization)
-
withConfig
public KubernetesClientBuilder withConfig(Config config)
-
withConfig
public KubernetesClientBuilder withConfig(String config)
-
withConfig
public KubernetesClientBuilder withConfig(InputStream config)
-
withHttpClientFactory
public KubernetesClientBuilder withHttpClientFactory(HttpClient.Factory factory)
-
withTaskExecutor
public KubernetesClientBuilder withTaskExecutor(Executor executor)
Configure the client to use the given executor for async tasks, such asResourceEventHandlercalls and writing to streams.Only override if you need more control over the number of task threads used by the kubernetes client.
- Returns:
- this builder
-
withTaskExecutorSupplier
public KubernetesClientBuilder withTaskExecutorSupplier(KubernetesClientBuilder.ExecutorSupplier executorSupplier)
Configure the client to use the givenKubernetesClientBuilder.ExecutorSupplierfor async tasks, such asResourceEventHandlercalls and writing to streams.There will be a call to
KubernetesClientBuilder.ExecutorSupplier.onClose(Executor)when a client is closed.Only override if you need more control over the number of task threads used by the kubernetes client.
- Returns:
- this builder
-
withHttpClientBuilderConsumer
public KubernetesClientBuilder withHttpClientBuilderConsumer(Consumer<HttpClient.Builder> consumer)
Provide additional configuration for theHttpClientthat is created for thisKubernetesClient.- Parameters:
consumer- to modify theHttpClient.Builder- Returns:
- this builder
-
editOrNewConfig
public KubernetesClientBuilder.ConfigNested editOrNewConfig()
-
-