Feat/configurable memory limit#9200
Open
MatheuslFavaretto wants to merge 5 commits into
Open
Conversation
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.
feat: support configurable MEMORY_LIMIT in Helm chart
Problem
The Helm chart sets
MEMORY_LIMITunconditionally viaresourceFieldRef, always usingthe full
limits.memoryvalue. This results in a static 90% GOMEMLIMIT that cannot becustomized or disabled, which is not suitable for all environments.
Fixes #9162
Solution
Add a
controller.memoryLimitvalue to the Helm chart that allows overriding theMEMORY_LIMITenv var directly.""(default)limits.memoryautomatically viaresourceFieldRef"-1"1073741824for 1Gi)Changes
charts/karpenter/templates/deployment.yaml— wrapMEMORY_LIMITin a conditionalcharts/karpenter/values.yaml— addcontroller.memoryLimitfield with documentationTesting
This change is backwards compatible. With
controller.memoryLimit: ""(default),the rendered template is identical to the previous behavior.
Fixes #N/A
Description
Add a
controller.memoryLimitfield to the Helm chart so users can override, disable,or leave as-is the
MEMORY_LIMITenvironment variable used to configure GOMEMLIMIT.How was this change tested?
Rendered the Helm template with each possible
controller.memoryLimitvalue and verifiedthe output matches the expected behavior in all three cases.
Does this change impact docs?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.