gyfora commented on code in PR #487:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/487#discussion_r1057748254
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/validation/DefaultValidator.java:
##########
@@ -241,15 +245,35 @@ private Optional<String> validateJobSpec(
}
private Optional<String> validateJmSpec(JobManagerSpec jmSpec, Map<String,
String> confMap) {
+ Configuration conf = Configuration.fromMap(confMap);
+ var jmMemoryDefined =
+ jmSpec != null
+ && jmSpec.getResource() != null
+ &&
!StringUtils.isNullOrWhitespaceOnly(jmSpec.getResource().getMemory());
+ Optional<String> jmMemoryValidation =
+ jmMemoryDefined ? Optional.empty() :
validateJmMemoryConfig(conf);
+
if (jmSpec == null) {
- return Optional.empty();
+ return jmMemoryValidation;
}
return firstPresent(
+ jmMemoryValidation,
validateResources("JobManager", jmSpec.getResource()),
validateJmReplicas(jmSpec.getReplicas(), confMap));
}
+ private Optional<String> validateJmMemoryConfig(Configuration conf) {
+ try {
+
JobManagerProcessUtils.processSpecFromConfigWithNewOptionToInterpretLegacyHeap(
Review Comment:
Why do we use this method vs using `processSpecFromConfig`?
--
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]