[ 
https://issues.apache.org/jira/browse/FLINK-26356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17498402#comment-17498402
 ] 

Aitozi commented on FLINK-26356:
--------------------------------

I have some misunderstand before, since the operator will always be deployed in 
the same cluster with Flink job, so we do not rely on the full functionality of 
the external service.

I did a little test in minikube cluster to verify the behavior.  In 
\{{NodePort}}, \{{LoadBalancer}} and \{{ClusterIP}} mode the rest url 
{{<cluster-id>-rest.<namespace>}} will be route to the clusterIp. In 
\{{Headless_Cluster_IP}} the rest url will be route to the jobManager directly. 
 So all the service type here will be functional work use with 
{{<cluster-id>-rest.<namespace>}} :)

> Revisit the create of RestClusterClient
> ---------------------------------------
>
>                 Key: FLINK-26356
>                 URL: https://issues.apache.org/jira/browse/FLINK-26356
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Kubernetes Operator
>            Reporter: Aitozi
>            Priority: Major
>
> The clusterClient is built as below. The config is mixed up with the 
> FlinkDeploymentSpec and local default config. 
> {code:java}
> final int port = config.getInteger(RestOptions.PORT);
> final String host =
>         config.getString(
>                 RestOptions.ADDRESS, String.format("%s-rest.%s", clusterId, 
> namespace));
> final String restServerAddress = String.format("http://%s:%s";, host, port); 
> {code}
> But the {{RestOptions.ADDRESS}} is generated at the entrypoint when the HA is 
> enabled, so the option can not obtain from the FlinkDeploymentSpec.
> Furthermore, the default rest url is not suitable for all the service type. I 
> think we should extract the rest endpoint from the Flink external service.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to