Package io.micronaut.kubernetes.client
Class ApiClientFactory
java.lang.Object
io.micronaut.kubernetes.client.ApiClientFactory
ApiClient
bean factory that creates either in cluster ClientBuilder.cluster()
client or
ClientBuilder.kubeconfig(KubeConfig)
client.- Since:
- 2.2
- Author:
- Pavol Gressa
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.kubernetes.client.openapi.ApiClient
apiClient
(io.kubernetes.client.util.ClientBuilder clientBuilder) Deprecated.io.kubernetes.client.openapi.ApiClient
apiClient
(io.kubernetes.client.util.ClientBuilder clientBuilder, @Nullable ExecutorService executorService) Creates ApiClient.io.kubernetes.client.util.ClientBuilder
clientBuilder
(ApiClientConfiguration apiClientConfiguration) CreatesClientBuilder
that is either configured from specified configuration options or automatically detected byClientBuilder.standard()
.
-
Constructor Details
-
ApiClientFactory
public ApiClientFactory()
-
-
Method Details
-
clientBuilder
@Singleton public io.kubernetes.client.util.ClientBuilder clientBuilder(ApiClientConfiguration apiClientConfiguration) throws IOException CreatesClientBuilder
that is either configured from specified configuration options or automatically detected byClientBuilder.standard()
.- Parameters:
apiClientConfiguration
- api client configuration that overrides default configuration- Returns:
- client builder
- Throws:
IOException
- if the CA or Token files were not found- Since:
- 3.0
-
apiClient
public io.kubernetes.client.openapi.ApiClient apiClient(io.kubernetes.client.util.ClientBuilder clientBuilder) throws IOException Deprecated.Creates ApiClient.- Parameters:
clientBuilder
- client builder- Returns:
- ApiClient api client
- Throws:
IOException
- if the CA or Token files were not found
-
apiClient
@Singleton public io.kubernetes.client.openapi.ApiClient apiClient(io.kubernetes.client.util.ClientBuilder clientBuilder, @Nullable @Named("io") @Nullable ExecutorService executorService) throws IOException Creates ApiClient.- Parameters:
clientBuilder
- client builderexecutorService
- executor service- Returns:
- ApiClient api client
- Throws:
IOException
- if the CA or Token files were not found- Since:
- 3.2
-
apiClient(ClientBuilder, ExecutorService)
.