[FLINK-40105][Deployment/Kubernetes] Support memory request factor for Kubernetes deployments#28693
Open
ChenlingXie wants to merge 1 commit into
Open
Conversation
…r Kubernetes deployments Generated-by: OpenAI Codex
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This pull request allows Kubernetes deployments to configure memory requests independently from memory limits for JobManager and TaskManager containers.
Previously, Kubernetes memory requests were always set to the configured process memory, while memory limits could be adjusted with the existing memory limit factor. This change adds request factors so users can lower Kubernetes memory requests while preserving the existing limit-factor behavior.
Brief change log
kubernetes.jobmanager.memory.request-factorandkubernetes.taskmanager.memory.request-factor, both defaulting to1.0.0and less than or equal to1.Verifying this change
This change added tests and can be verified as follows:
InitJobManagerDecoratorTestandInitTaskManagerDecoratorTestfor generated memory requests while memory limits still use the existing limit factors.KubernetesJobManagerParametersTestandKubernetesTaskManagerParametersTestfor default, custom, and invalid memory request factors.mvn -pl flink-kubernetes -am "-Dtest=InitJobManagerDecoratorTest,InitTaskManagerDecoratorTest,KubernetesJobManagerParametersTest,KubernetesTaskManagerParametersTest" test -DskipITs "-Drat.skip=true" "-Dcheckstyle.skip=true" "-DfailIfNoTests=false" "-Dsurefire.failIfNoSpecifiedTests=false"mvn package -Dgenerate-config-docs -pl flink-docs -am -nsu -DskipTests -DskipITs -Dfast "-Drat.skip=true" "-Dcheckstyle.skip=true" -Pskip-webui-buildgit diff --check.Does this pull request potentially affect one of the following parts:
@Public(Evolving): yesDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI Codex