Class KubernetesServiceInstanceServiceProvider
java.lang.Object
io.micronaut.kubernetes.discovery.AbstractKubernetesServiceInstanceProvider
io.micronaut.kubernetes.discovery.provider.AbstractV1ServiceProvider
io.micronaut.kubernetes.discovery.provider.KubernetesServiceInstanceServiceProvider
- All Implemented Interfaces:
KubernetesServiceInstanceProvider
@Requires(property="kubernetes.client.discovery.mode-configuration.service.watch.enabled",
notEquals="true",
defaultValue="false")
@Singleton
public class KubernetesServiceInstanceServiceProvider
extends AbstractV1ServiceProvider
Service instance provider uses Kubernetes Service API as source of service discovery.
- Since:
- 2.3
- Author:
- Pavol Gressa
-
Nested Class Summary
Nested classes/interfaces inherited from class io.micronaut.kubernetes.discovery.AbstractKubernetesServiceInstanceProvider
AbstractKubernetesServiceInstanceProvider.PortBinder
-
Field Summary
Fields inherited from class io.micronaut.kubernetes.discovery.provider.AbstractV1ServiceProvider
EXTERNAL_NAME, MODE
Fields inherited from class io.micronaut.kubernetes.discovery.AbstractKubernetesServiceInstanceProvider
SECURE_LABEL
-
Constructor Summary
ConstructorDescriptionKubernetesServiceInstanceServiceProvider
(io.micronaut.kubernetes.client.reactor.CoreV1ApiReactorClient client, KubernetesConfiguration.KubernetesDiscoveryConfiguration discoveryConfiguration) Creates kubernetes instance service provider. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<io.kubernetes.client.openapi.models.V1Service>
getService
(String name, String namespace) reactor.core.publisher.Flux<io.kubernetes.client.openapi.models.V1Service>
listServices
(String namespace) Methods inherited from class io.micronaut.kubernetes.discovery.provider.AbstractV1ServiceProvider
getInstances, getMode, getServiceIds
Methods inherited from class io.micronaut.kubernetes.discovery.AbstractKubernetesServiceInstanceProvider
buildServiceInstance, compositePredicate, discoveryConfigurationFilter, hasValidPortConfiguration, isMetadataSecure, isPortSecure, serviceConfigurationDiscoveryFilter
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
KubernetesServiceInstanceServiceProvider
public KubernetesServiceInstanceServiceProvider(io.micronaut.kubernetes.client.reactor.CoreV1ApiReactorClient client, KubernetesConfiguration.KubernetesDiscoveryConfiguration discoveryConfiguration) Creates kubernetes instance service provider.- Parameters:
client
- clientdiscoveryConfiguration
- discovery configuration
-
-
Method Details
-
getService
public reactor.core.publisher.Mono<io.kubernetes.client.openapi.models.V1Service> getService(String name, String namespace) - Specified by:
getService
in classAbstractV1ServiceProvider
-
listServices
public reactor.core.publisher.Flux<io.kubernetes.client.openapi.models.V1Service> listServices(String namespace) - Specified by:
listServices
in classAbstractV1ServiceProvider
-