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/12/23 03:43:48 UTC

[GitHub] [flink] xintongsong commented on a change in pull request #14419: [FLINK-20650][k8s] Remove "native-k8s" command and add bash wrapper for JobManager and TaskManager container args

xintongsong commented on a change in pull request #14419:
URL: https://github.com/apache/flink/pull/14419#discussion_r547622579



##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/decorators/JavaCmdJobManagerDecorator.java
##########
@@ -61,7 +58,7 @@ public FlinkPod decorateFlinkPod(FlinkPod flinkPod) {
 
 		final Container mainContainerWithStartCmd = new ContainerBuilder(flinkPod.getMainContainer())
 			.withCommand(kubernetesJobManagerParameters.getContainerEntrypoint())
-			.withArgs(Arrays.asList(NATIVE_KUBERNETES_COMMAND, startCommand))
+			.withArgs(KubernetesUtils.getStartCommandWithBashWrapper(startCommand))

Review comment:
       It might be better to call `KubernetesUtils#getStartCommandWithBashWrapper` from inside `getJobManagerStartCommand`, and make `getJobManagerStartCommand` returns an array. This would ensure the start command is always wrapped with `bash -c`.

##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/decorators/JavaCmdTaskManagerDecorator.java
##########
@@ -52,7 +49,7 @@ public JavaCmdTaskManagerDecorator(KubernetesTaskManagerParameters kubernetesTas
 	public FlinkPod decorateFlinkPod(FlinkPod flinkPod) {
 		final Container mainContainerWithStartCmd = new ContainerBuilder(flinkPod.getMainContainer())
 			.withCommand(kubernetesTaskManagerParameters.getContainerEntrypoint())
-			.withArgs(Arrays.asList(NATIVE_KUBERNETES_COMMAND, getTaskManagerStartCommand()))
+			.withArgs(KubernetesUtils.getStartCommandWithBashWrapper(getTaskManagerStartCommand()))

Review comment:
       Same here. `KubernetesUtils#getStartCommandWithBashWrapper` can be moved into `getTaskManagerStartCommand`.




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