wanglijie95 commented on code in PR #20056:
URL: https://github.com/apache/flink/pull/20056#discussion_r910727201
##########
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:
-> Maybe we could make it configured via `ENV_FLINK_POD_NODE_ID`.
ENV_FLINK_POD_NODE_ID needs to be configured by users in yaml, which is also
a public interface in a sense.
-> Because the hostname(aka external address) is the pod name, not the real
node-id.
This is indeed a problem, I think we should add a limitation for this case.
In standalone on k8s mode, this can only block a TM, not a node.
--
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]