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

   ## What is the purpose of the change
   
   Protect against large autoscaler config maps. Improperly packaged autoscaler 
config maps can cause the Flink Kubernetes operator to fail with an 
OutOfMemoryException. We should put a size limit.
   
   ## Brief change log
   
     - Added a bounded-read helper for decompressing autoscaler state (scaling 
history, scaling tracking, collected metrics) read from the `autoscaler-<app>` 
ConfigMap, capped at 20MB to match the existing YAML parser's own size limit
     - Oversized or corrupted compressed values are now discarded through the 
existing fallback/migration path instead of being fully decompressed into memory
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
     - Added 
`KubernetesAutoScalerStateStoreTest#testDiscardOversizedCompressedHistory`, 
which injects an oversized compressed ConfigMap entry directly and verifies it 
is discarded rather than causing unbounded memory growth
   
   ## 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 (only 
the autoscaler state store's read path)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (Claude Code)
   
   Generated-by: Claude Code
   


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