Repository navigation
corndog: apply memory.min for kubelet and containerd - #1114
Draft
qianxjcraig wants to merge 2 commits into
Draft
qianxjcraig wants to merge 2 commits into
qianxjcraig wants to merge 2 commits into
Conversation
qianxjcraig
force-pushed
the
br4916-memmin-20261028
branch
from
October 30, 2026 05:22
64cff93 to
6e670cb
Compare
Render memory.min drop-ins for kubelet, containerd and their parent runtime.slice from settings.kubernetes.kube-reserved-memory-min, and apply them with `systemctl set-property --runtime` so changes take effect without restarting either service. Signed-off-by: Craig Qian <qianxj@amazon.com>
This lets variants mark settings they don't use with `affected-services = []`. Signed-off-by: Craig Qian <qianxj@amazon.com>
qianxjcraig
force-pushed
the
br4916-memmin-20261028
branch
from
October 30, 2026 07:20
6e670cb to
fb7343d
Compare
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.
Issue number:
Related: bottlerocket-os/bottlerocket#4916
Depends on bottlerocket-os/bottlerocket-settings-sdk#163.
Description of changes:
Under memory pressure on zram swap variants, kubelet and containerd memory can be reclaimed or swapped out, and kubelet stalls until the node goes NotReady. This protects both services with cgroup v2
memory.min, set bysettings.kubernetes.kube-reserved-memory-min:release-swapadds templates that renderMemoryMin=drop-ins forkubelet.service,containerd.serviceand their parentruntime.slice(set to the sum of the two). Unset values render0.corndog apply-kube-reserved-memory-minapplies them withsystemctl set-property --runtime, so changes take effect without restarting kubelet or containerd.thar-be-settingsskips the services lookup when a setting's affected-services list is empty.Variants opt in through their settings defaults. Nothing changes for variants that don't.
Results:
In lab runs that reproduce the NotReady issue (reproduction: a pod memory leak on c7i, c7g and c7a nodes with a small kube-reserved), setting kubelet and containerd to 128 MiB each kept every node Ready:
Testing done:
cargo testforcorndog,schnauzerandthar-be-settingspasses.On an
aws-k8s-1.35t3a.medium node with this change:memory.min128Mi200Miapiclient set200Mi / 300Mi on a running nodeTerms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.