Skip to content

Feat/configurable memory limit#9200

Open
MatheuslFavaretto wants to merge 5 commits into
aws:mainfrom
MatheuslFavaretto:feat/configurable-memory-limit
Open

Feat/configurable memory limit#9200
MatheuslFavaretto wants to merge 5 commits into
aws:mainfrom
MatheuslFavaretto:feat/configurable-memory-limit

Conversation

@MatheuslFavaretto

Copy link
Copy Markdown

feat: support configurable MEMORY_LIMIT in Helm chart

Problem

The Helm chart sets MEMORY_LIMIT unconditionally via resourceFieldRef, always using
the full limits.memory value. This results in a static 90% GOMEMLIMIT that cannot be
customized or disabled, which is not suitable for all environments.

Fixes #9162

Solution

Add a controller.memoryLimit value to the Helm chart that allows overriding the
MEMORY_LIMIT env var directly.

Value Behavior
"" (default) Keeps current behavior — uses limits.memory automatically via resourceFieldRef
"-1" Disables GOMEMLIMIT entirely
any byte value (e.g. 1073741824 for 1Gi) Sets a custom limit

Changes

  • charts/karpenter/templates/deployment.yaml — wrap MEMORY_LIMIT in a conditional
  • charts/karpenter/values.yaml — add controller.memoryLimit field with documentation

Testing

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.memoryLimit field to the Helm chart so users can override, disable,
or leave as-is the MEMORY_LIMIT environment variable used to configure GOMEMLIMIT.

How was this change tested?

Rendered the Helm template with each possible controller.memoryLimit value and verified
the output matches the expected behavior in all three cases.

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support customizing memory limits in Helm Chart

1 participant