You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/10 15:15:29 UTC

[GitHub] [flink-docker] rmetzger commented on a change in pull request #37: [FLINK-15793] Support native K8s mode

rmetzger commented on a change in pull request #37:
URL: https://github.com/apache/flink-docker/pull/37#discussion_r467971622



##########
File path: docker-entrypoint.sh
##########
@@ -120,6 +120,16 @@ elif [ "$1" = "taskmanager" ]; then
     envsubst < "${CONF_FILE}" > "${CONF_FILE}.tmp" && mv "${CONF_FILE}.tmp" "${CONF_FILE}"
 
     exec $(drop_privs_cmd) "$FLINK_HOME/bin/taskmanager.sh" start-foreground "$@"
+elif [ "$1" = "native-k8s" ]; then
+    shift 1
+    copy_plugins_if_required
+
+    export _FLINK_HOME_DETERMINED=true
+    . $FLINK_HOME/bin/config.sh
+    export FLINK_CLASSPATH="`constructFlinkClassPath`:$INTERNAL_HADOOP_CLASSPATHS"
+    # Start commands for jobmanager and taskmanager are generated by Flink internally.
+    echo "Start command: $*"
+    exec bash -c "$@"

Review comment:
       Any reason why you are not using `drop_privs_cmd` like the other commands?
   Many enterprise k8s environments require non-root container support, and it seems easy to support for us.

##########
File path: docker-entrypoint.sh
##########
@@ -120,6 +120,16 @@ elif [ "$1" = "taskmanager" ]; then
     envsubst < "${CONF_FILE}" > "${CONF_FILE}.tmp" && mv "${CONF_FILE}.tmp" "${CONF_FILE}"
 
     exec $(drop_privs_cmd) "$FLINK_HOME/bin/taskmanager.sh" start-foreground "$@"
+elif [ "$1" = "native-k8s" ]; then

Review comment:
       Why are did you not add this command to the output of the "help" command?




----------------------------------------------------------------
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:
users@infra.apache.org