You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/16 03:04:03 UTC

[GitHub] [flink] wangyang0918 commented on a change in pull request #10579: [FLINK-15251] In Fabric8FlinkKubeClient use ingress hostname if IP is not present

wangyang0918 commented on a change in pull request #10579: [FLINK-15251] In Fabric8FlinkKubeClient use ingress hostname if IP is not present
URL: https://github.com/apache/flink/pull/10579#discussion_r358037007
 
 

 ##########
 File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
 ##########
 @@ -197,6 +197,9 @@ public Endpoint getRestEndpoint(String clusterId) {
 			service.getStatus().getLoadBalancer().getIngress() != null)) {
 			if (service.getStatus().getLoadBalancer().getIngress().size() > 0) {
 				address = service.getStatus().getLoadBalancer().getIngress().get(0).getIp();
+				if (address == null) {
+					address = service.getStatus().getLoadBalancer().getIngress().get(0).getHostname();
+				}
 			} else {
 				address = this.internalClient.getMasterUrl().getHost();
 				restPort = getServiceNodePort(service, RestOptions.PORT);
 
 Review comment:
   Could we check the null of address before `return new Endpoint(address, restPort)`. 
   ```
   if (address == null) {
     return null;
   }
   return new Endpoint(address, restPort);
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services