Skip to content
Permalink
Browse files
[FLINK-17232][k8s] Disable the implicit behavior to use the Service e…
…xternalIP as the address of the Endpoint
  • Loading branch information
Aitozi authored and wangyang0918 committed May 16, 2022
1 parent 4c138a4 commit 0ff1e40540c788fdc967e5f91c170b08b59a9c48
Showing 1 changed file with 0 additions and 9 deletions.
@@ -74,19 +74,10 @@ private Optional<Endpoint> getRestEndPointFromService(
}

LoadBalancerStatus loadBalancer = service.getStatus().getLoadBalancer();
boolean hasExternalIP =
service.getSpec() != null
&& service.getSpec().getExternalIPs() != null
&& !service.getSpec().getExternalIPs().isEmpty();

if (loadBalancer != null) {
return getLoadBalancerRestEndpoint(
internalClient, nodePortAddressType, loadBalancer, restPort);
} else if (hasExternalIP) {
final String address = service.getSpec().getExternalIPs().get(0);
if (address != null && !address.isEmpty()) {
return Optional.of(new Endpoint(address, restPort));
}
}
return Optional.empty();
}

0 comments on commit 0ff1e40

Please sign in to comment.