Repository navigation
fix(k8s): set admin Go soft memory limit in prod and prod-us (hotfix) - #1272
Merged
Merged
Conversation
Without GOMEMLIMIT the admin heap grows to about twice the live set before GC runs, ignoring the 2Gi container limit. During a write burst the admin recompiles the config snapshot on every write, and prod admin pods swung between 1.1Gi and 1.95Gi, tripping the memory saturation alert at 95%. Use the same 75% ratio as dev (768MiB of 1Gi): 1536MiB of 2Gi.
Contributor
Trivy code scan — HIGH/CRITICALNo HIGH or CRITICAL vulnerabilities found. (run) |
kadubarral-nt
approved these changes
Nov 6, 2026
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.
Summary
Hotfix to
mainwith only the memory fix from #1270 (already ondevelop, cherry-picked as-is):GOMEMLIMIT=1536MiBon theadmincontainer in the prod and prod-us overlays (75% of the 2Gi limit, same ratio as dev).Nothing else from
developis included; Store Everyone (#1268) stays out of this hotfix.Why
On 2026-11-06 the
platform-pod-saturationalert fired for the admin in saas-prod (memory at 95% of 2Gi). It is not a leak: a stream of consumer/auth writes on one gateway drove about 210 snapshot compiles per hour, and withoutGOMEMLIMITthe Go heap swung between 1.1Gi and 1.95Gi. The soft limit makes the GC collect before the container limit.Test plan
kubectl kustomize k8s/overlays/{prod,prod-us}renders; the admin env adds onlyGOMEMLIMIT, and resources and image pins are unchangedhealthzversionupdates in EU and USkubectl topunder write load