Class KubernetesServiceInstanceEndpointProvider
java.lang.Object
io.micronaut.kubernetes.discovery.AbstractKubernetesServiceInstanceProvider
io.micronaut.kubernetes.discovery.provider.AbstractV1EndpointsProvider
io.micronaut.kubernetes.discovery.provider.KubernetesServiceInstanceEndpointProvider
- All Implemented Interfaces:
KubernetesServiceInstanceProvider
@Requires(property="kubernetes.client.discovery.mode-configuration.endpoint.watch.enabled",
notEquals="true",
defaultValue="false")
@Singleton
public class KubernetesServiceInstanceEndpointProvider
extends AbstractV1EndpointsProvider
Service instance provider uses Kubernetes Endpoints 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.AbstractV1EndpointsProvider
MODE
Fields inherited from class io.micronaut.kubernetes.discovery.AbstractKubernetesServiceInstanceProvider
SECURE_LABEL
-
Constructor Summary
ConstructorDescriptionKubernetesServiceInstanceEndpointProvider
(io.micronaut.kubernetes.client.reactor.CoreV1ApiReactorClient client, KubernetesConfiguration.KubernetesDiscoveryConfiguration discoveryConfiguration) Creates kubernetes instance endpoint provider. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<io.kubernetes.client.openapi.models.V1Endpoints>
getEndpoints
(String name, String namespace) reactor.core.publisher.Flux<io.kubernetes.client.openapi.models.V1Endpoints>
listEndpoints
(String namespace) Methods inherited from class io.micronaut.kubernetes.discovery.provider.AbstractV1EndpointsProvider
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
-
KubernetesServiceInstanceEndpointProvider
public KubernetesServiceInstanceEndpointProvider(io.micronaut.kubernetes.client.reactor.CoreV1ApiReactorClient client, KubernetesConfiguration.KubernetesDiscoveryConfiguration discoveryConfiguration) Creates kubernetes instance endpoint provider.- Parameters:
client
- clientdiscoveryConfiguration
- discovery configuration
-
-
Method Details
-
getEndpoints
public reactor.core.publisher.Mono<io.kubernetes.client.openapi.models.V1Endpoints> getEndpoints(String name, String namespace) - Specified by:
getEndpoints
in classAbstractV1EndpointsProvider
-
listEndpoints
public reactor.core.publisher.Flux<io.kubernetes.client.openapi.models.V1Endpoints> listEndpoints(String namespace) - Specified by:
listEndpoints
in classAbstractV1EndpointsProvider
-