Interface KubernetesNodeIpExtractor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An SPI for extracting the IP address of a Kubernetes
Node that backs a
ServiceEndpointWatcher.
An implementation is discovered via ServiceLoader and used by the xDS
Kubernetes integration to determine which IP address should be used for each Node
when resolving a Service's endpoints. If no implementation is registered, the default
InternalIP-based
extraction is used.
The watcher's
additional properties
are made available so that the extractor can be configured per watcher
(for example, a label or annotation key to read the IP from).
-
Method Summary
Modifier and TypeMethodDescription@Nullable Stringextract(ServiceEndpointWatcher watcherConfig, io.fabric8.kubernetes.api.model.Node node) Extracts a Node IP address from the givenNode.
-
Method Details
-
extract
@Nullable String extract(ServiceEndpointWatcher watcherConfig, io.fabric8.kubernetes.api.model.Node node) Extracts a Node IP address from the givenNode. Ifnullis returned, theNodewill not be included in the endpoint list.
-