Class ApiClientFactory

java.lang.Object
io.micronaut.kubernetes.client.ApiClientFactory

@Factory public class ApiClientFactory extends Object
ApiClient bean factory that creates either in cluster ClientBuilder.cluster() client or ClientBuilder.kubeconfig(KubeConfig) client.
Since:
2.2
Author:
Pavol Gressa
  • Constructor Details

    • ApiClientFactory

      public ApiClientFactory()
  • Method Details

    • clientBuilder

      @Singleton public io.kubernetes.client.util.ClientBuilder clientBuilder(ApiClientConfiguration apiClientConfiguration) throws IOException
      Creates ClientBuilder that is either configured from specified configuration options or automatically detected by ClientBuilder.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
      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 builder
      executorService - executor service
      Returns:
      ApiClient api client
      Throws:
      IOException - if the CA or Token files were not found
      Since:
      3.2