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

tartarus commented on FLINK-27677:
----------------------------------

[~wangyang0918]  thank you for your reply!

The scenarios of k8s and yarn are different. If we configure rest.bind-port as 
a port range, the UT in KubernetesClusterDescriptorTest will fail.

So my suggestion is:
1. Modify the description information of rest.bind-port and add that only fixed 
ports are currently supported in the k8s environment;
2. Add a configuration item for k8s, such as kubernetes.rest.bind-port;
3. KubernetesUtils adds the ability to handle port ranges and select a port 
from them;

Do you have any other suggestions?

> 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)

Reply via email to