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

Andrey Zagrebin edited comment on FLINK-17077 at 5/19/20, 1:34 PM:
-------------------------------------------------------------------

I see you concern. The reason, the ports are overridden, is that they are 
basically part of [the documented Flink docker image 
API|https://hub.docker.com/_/flink?tab=description] (see Configuration 
chapter). The Dockerfile even exposes [some of 
them|https://github.com/apache/flink-docker/blob/master/1.10/scala_2.11-debian/Dockerfile#L86].
 Although, you can usually expose and publish more ports with `docker run 
--expose .. -p ..`, changing those ports does not seem to have use cases. All 
ports, hard-set in entry point, exist only in container internal port space. 
They can be usually mapped and published as any other ports for external 
container access. 

We could remove setting of these ports from entry point if they are explicitly 
set by user in flink-conf.yaml. The problem is that this will break the image 
API and may bring more confusion for users if they accidentally change the 
ports in flink-conf.yaml.

I suppose (correct me if wrong) that users of the Flink Kubernetes operator 
generally do not care about port wiring for internal container communication. 
It is task of the Flink Kubernetes operator to set up this correctly. Users 
probably need to be able to access the Web UI from some node/cluster public 
ip:port. I would consider this to be more an option of the Flink Kubernetes 
operator to decide how to set up and expose the port from the Flink deployment. 
In this case, I would rather document in the Flink Kubernetes operator that 
those internal ports are not to be set by user in configMap.


was (Author: azagrebin):
I see you concern. The reason, the ports are overridden, is that they are 
basically part of [the documented Flink docker image 
API|https://hub.docker.com/_/flink?tab=description] (see Configuration 
chapter). The Dockerfile even exposes [some of 
them|https://github.com/apache/flink-docker/blob/master/1.10/scala_2.11-debian/Dockerfile#L86].
 Although, you can usually expose and publish more ports with `docker run 
--expose .. -p ..`, changing those ports does not seem to have use cases. All 
ports, hard-set in entry point, exist only in container internal port space. 
They can be usually mapped and published as any other ports for external 
container access. We could remove setting of these ports from entry point if 
they are explicitly set by user in flink-conf.yaml but this will then break the 
image API.

I suppose (correct me if wrong) that users of the Flink Kubernetes operator 
generally do not care about port wiring for internal container communication. 
It is task of the Flink Kubernetes operator to set up this correctly. Users 
probably need to be able to access the Web UI from some node/cluster public 
ip:port. I would consider this to be more an option of the Flink Kubernetes 
operator to decide how to set up and expose the port from the Flink deployment. 
In this case, I would rather document in the Flink Kubernetes operator that 
those internal ports are not to be set by user in configMap.

> FLINK_CONF_DIR environment variable to locate flink-conf.yaml in Docker 
> container
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-17077
>                 URL: https://issues.apache.org/jira/browse/FLINK-17077
>             Project: Flink
>          Issue Type: Improvement
>          Components: Deployment / Docker
>            Reporter: Eui Heo
>            Assignee: Eui Heo
>            Priority: Major
>              Labels: Kubernetes, docker
>
> To use flink-conf.yaml outside Flink home directory, we should use 
> FLINK_CONF_DIR.
> But despite of FLINK_CONF_DIR is provided, docker-entrypoint.sh in official 
> flink-docker doesn't know FLINK_CONF_DIR and it is ignored when append 
> additional flink properties to flink-conf.yaml. It would be good to use 
> FLINK_CONF_DIR for the location of flink-conf.yaml, if user provide it.
> https://github.com/apache/flink-docker/blob/master/docker-entrypoint.sh#L23



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to