wangyang0918 commented on a change in pull request #14692:
URL: https://github.com/apache/flink/pull/14692#discussion_r560073139
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesClusterDescriptor.java
##########
@@ -125,6 +121,16 @@ public String getClusterDescription() {
};
}
+ private String getWebMonitorAddress(Configuration configuration) throws
Exception {
+ HighAvailabilityServicesUtils.AddressResolution resolution =
+
HighAvailabilityServicesUtils.AddressResolution.TRY_ADDRESS_RESOLUTION;
+ if
(configuration.get(KubernetesConfigOptions.REST_SERVICE_EXPOSED_TYPE)
+ == KubernetesConfigOptions.ServiceExposedType.ClusterIP) {
+ resolution =
HighAvailabilityServicesUtils.AddressResolution.NO_ADDRESS_RESOLUTION;
+ }
+ return
HighAvailabilityServicesUtils.getWebMonitorAddress(configuration, resolution);
+ }
Review comment:
Flink client communicates with the cluster via namespaced service if
ClusterIP is chosen.
I assume you mean directly return a `RestClusterClient` using the namespaced
service(aka `restEndpoint.get().getAddress()`). After then, we also need to
check whether the ssl is enabled and add `http/https` protocol. I think it is
what we have done in `HighAvailabilityServicesUtils.getWebMonitorAddress`.
Moreover, I do not think we are retrieving the web monitor's address. It is
more like to construct the address in a specific schema(aka
protocol://address:port). The retrieval process has already been done in the
`flinkKubeClient.getRestEndpoint`.
----------------------------------------------------------------
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:
[email protected]