afedulov commented on code in PR #770: URL: https://github.com/apache/flink-kubernetes-operator/pull/770#discussion_r1478361632
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/diff/ReflectiveDiffBuilder.java: ########## @@ -172,4 +173,26 @@ private DiffType getType(SpecDiff.Config annotation, String key) { } return diffType; } + + private static void clearIgnoredFields(Object o) { Review Comment: It might be good to leave a comment to clarify that this step became necessary for the Pod/PodTemplateSpec transition. ########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/diff/ReflectiveDiffBuilder.java: ########## @@ -172,4 +173,26 @@ private DiffType getType(SpecDiff.Config annotation, String key) { } return diffType; } + + private static void clearIgnoredFields(Object o) { + if (o == null) { + return; + } + if (o instanceof FlinkDeploymentSpec) { + var spec = (FlinkDeploymentSpec) o; + clearAdditionalProps(spec.getPodTemplate()); + if (spec.getJobManager() != null) { + clearAdditionalProps(spec.getJobManager().getPodTemplate()); + } + if (spec.getTaskManager() != null) { + clearAdditionalProps(spec.getTaskManager().getPodTemplate()); + } + } + } + + private static void clearAdditionalProps(Object o) { + if (o != null && o instanceof PodTemplateSpec) { Review Comment: Could you clarify why this step became necessary after migrating to `PodTemplateSpec`? I see that `Pod` already had the `additionalProperties` field. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org