dalelane opened a new pull request, #1261:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1261

   This PR depends on #1223, #1259 
   
   Please only review the last **2 commits**, prefixed with FLINK-40863
   
   If it helps with reading, you can see a draft PR with just those two commits 
in my fork at https://github.com/dalelane/flink-kubernetes-operator/pull/2 
   
   ---
   
   Pending pull requests for 
[FLIP-611](https://cwiki.apache.org/confluence/spaces/FLINK/pages/451974246/FLIP-611+Running+Flink+jobs+in+MiniCluster+using+the+Kubernetes+Operator):
   - https://github.com/apache/flink-kubernetes-operator/pull/1223
   - https://github.com/apache/flink-kubernetes-operator/pull/1259
   
   ---
   
   ## What is the purpose of the change
   
   Flink uses its local execution memory model for MiniCluster, rather than the 
TaskManager process memory model that FKO can use for FlinkDeployments. This 
model ignores most memory options such as `taskmanager.memory.process.size` and 
starts the JVM without `-Xmx`. It does honour managed memory and network memory 
(which default to 128m and 64) but it leaves the heap to the JVM, which sizes 
it from the container memory limit if set, or the node's memory without one. It 
doesn't allow for any memory outside the heap. 
   
   This means FlinkMiniCluster needs something that can budget the container's 
memory. Users who don't manually configure the CPU/memory themselves need a 
reasonable default experience, that gives them a viable container that won't 
get OOM-killed.
   
   ## Brief change log
   
   - Settings are derived from spec.resources - preferring the request but 
falling back to the limit
   - If users provide their own JVM memory settings, those are used
   - If not, a ratio is applied that has been confirmed to be stable in 
repeated long-soak manual testing
   - checkMemoryBudget builds a message for the user if the settings look 
problematic
   
   ## Verifying this change
   
   This change added tests 
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: 
no
     - Core observer or reconciler logic that is regularly executed: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented? Documenting the new feature will 
be done in FLINK-40869
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes (please specify the tool below)
   
   Generated-by: Claude Code (Claude Opus 5.5)
   


-- 
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]

Reply via email to