Package io.fabric8.kubernetes.client
Class KubernetesClientBuilder
- java.lang.Object
-
- io.fabric8.kubernetes.client.KubernetesClientBuilder
-
public class KubernetesClientBuilder extends Object
If noExecutor
orKubernetesClientBuilder.ExecutorSupplier
is specified, a defaultKubernetesClientBuilder.ExecutorSupplier
will be used which creates an unbounded cached thread pool per client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
KubernetesClientBuilder.ConfigNested
static interface
KubernetesClientBuilder.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 asResourceEventHandler
calls 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.ExecutorSupplier
for async tasks, such asResourceEventHandler
calls 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 theHttpClient
that is created for thisKubernetesClient
.- Parameters:
consumer
- to modify theHttpClient.Builder
- Returns:
- this builder
-
editOrNewConfig
public KubernetesClientBuilder.ConfigNested editOrNewConfig()
-
-