HuangZhenQiu commented on code in PR #561:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/561#discussion_r1157758601
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/FlinkConfigBuilder.java:
##########
@@ -391,31 +399,87 @@ private static void setResource(
}
private static void setPodTemplate(
- Pod basicPod, Pod appendPod, Configuration effectiveConfig,
boolean isJM)
+ Pod basicPod,
+ Pod appendPod,
+ Resource resource,
+ Configuration effectiveConfig,
+ boolean isJM)
throws IOException {
- if (basicPod == null && appendPod == null) {
- return;
- }
-
// Avoid to create temporary pod template files for JobManager and
TaskManager if it is not
// configured explicitly via .spec.JobManagerSpec.podTemplate or
// .spec.TaskManagerSpec.podTemplate.
+ final ConfigOption<String> podConfigOption =
+ isJM
+ ? KubernetesConfigOptions.JOB_MANAGER_POD_TEMPLATE
+ : KubernetesConfigOptions.TASK_MANAGER_POD_TEMPLATE;
+
+ Pod basicPodWithResource = applyResourceToPodTemplate(basicPod,
resource);
Review Comment:
Yes, you are right. I think the best way to add the feature without breaking
feature is that:
Always merge first as long as not both basicPod and appendPod are null, then
apply resource to pod.
--
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]