wanglijie95 commented on code in PR #20056:
URL: https://github.com/apache/flink/pull/20056#discussion_r909344806
##########
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/decorators/InitTaskManagerDecorator.java:
##########
@@ -149,7 +153,16 @@ private Container decorateMainContainer(Container
container) {
.withResources(resourceRequirements);
// Merge fields
-
mainContainerBuilder.addAllToPorts(getContainerPorts()).addAllToEnv(getCustomizedEnvs());
+ mainContainerBuilder
+ .addAllToPorts(getContainerPorts())
+ .addAllToEnv(getCustomizedEnvs())
+ .addNewEnv()
+ .withName(ENV_FLINK_POD_NODE_ID)
+ .withValueFrom(
Review Comment:
I have concerns on this, because currently TMs in standalone clusters don't
know the deployment environment (`standalone` or `standalone on k8s`). I prefer
not do this, and maybe we can let the
`TaskManagerOptionsInternal#TASK_MANAGER_NODE_ID` as public option later, and
then users can configure it in yaml (like [config
`taskmanager.resource-id`](https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/resource-providers/standalone/kubernetes/#:~:text=args%3A%20%5B%22taskmanager%22%2C%20%22%2DDtaskmanager.resource%2Did%3D%24(POD_NAME)%22%5D))
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]