[
https://issues.apache.org/jira/browse/FLINK-27677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17539204#comment-17539204
]
Yang Wang commented on FLINK-27677:
-----------------------------------
If you configure rest.bind-port as a port range, the UT in
KubernetesClusterDescriptorTest will certainly fail. Because we do not support
this.
I admit that the {{rest.bind-port}} is not fully respected by native K8s
deployment, as well as {{blob.server.port}}, {{taskmanager.rpc.port}}, etc. But
it is trivial since users do not need to configure a port range when deploying
on K8s.
For your suggestions, the #2 is unnecessary and will make the users more
confused. And #3, we should not select a port from the range in the
{{KubernetesUtils}}. Instead, it needs to be done in the JobManager side. And
then the k8s rest service target port also needs to be updated accordingly.
Then it is an overkill.
If you insist, I agree we could update the description for all the port range
related config options. Even though, I prefer to believe it is not really
necessary.
> Kubernetes reuse rest.bind-port, but do not support a range of ports
> --------------------------------------------------------------------
>
> Key: FLINK-27677
> URL: https://issues.apache.org/jira/browse/FLINK-27677
> Project: Flink
> Issue Type: Bug
> Components: Deployment / Kubernetes
> Affects Versions: 1.15.0
> Reporter: tartarus
> Priority: Major
>
> k8s module reuse the rest options {color:#DE350B}rest.bind-port{color},
> but do not support a range of ports
> {code:java}
> /**
> * Parse a valid port for the config option. A fixed port is expected,
> and do not support a
> * range of ports.
> *
> * @param flinkConfig flink config
> * @param port port config option
> * @return valid port
> */
> public static Integer parsePort(Configuration flinkConfig,
> ConfigOption<String> port) {
> checkNotNull(flinkConfig.get(port), port.key() + " should not be
> null.");
> try {
> return Integer.parseInt(flinkConfig.get(port));
> } catch (NumberFormatException ex) {
> throw new FlinkRuntimeException(
> port.key()
> + " should be specified to a fixed port. Do not
> support a range of ports.",
> ex);
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)