Skip to content

feat: add default memory limit for shutdown-manager - #10221

Closed
wangyusheng1985 wants to merge 2 commits into
envoyproxy:mainfrom
wangyusheng1985:contribution-8912
Closed

wangyusheng1985 wants to merge 2 commits into
envoyproxy:mainfrom
wangyusheng1985:contribution-8912

Conversation

@wangyusheng1985

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

The shutdown-manager container has default CPU and memory requests but no limits. Clusters with LimitRange or strict resource policies can inject an inappropriate limit, and users otherwise have to patch via the EnvoyProxy CRD.

This adds a default 32Mi memory limit for shutdown-manager, matching the existing request. CPU limits stay unset. User-overridden shutdown-manager resources are unchanged.

Which issue(s) this PR fixes:
Fixes #8912


PR Checklist

  • Authorship & ownership: Coding agents / AI assistants are welcome, but I have reviewed every change, understand how and why it works, can explain and maintain it, and take full responsibility for this PR. I have not submitted generated output I do not understand.
  • DCO: All commits are signed off (git commit -s). See DCO: Sign your work.
  • API agreed first: N/A: no API type or CRD field changes; only default container resource constants.
  • Required checks pass: Unit tests for api/v1alpha1 and internal/infrastructure/kubernetes/proxy pass. make generate gen-check / make lint not run locally.
  • Tests added/updated: Added TestDefaultShutdownManagerContainerResourceRequirements and updated default golden YAML. Override goldens (deployments/shutdown-manager.yaml, daemonsets/shutdown-manager.yaml) are unchanged.
  • Docs: N/A: default resource values only; no user-facing API docs.
  • Release notes: Added release-notes/current/new_features/8912-shutdown-manager-memory-limit.md.
  • Generated files committed: N/A: no API/helm/module generation.
  • Scope & compatibility: Limited to shutdown-manager defaults. Existing EnvoyProxy resource overrides still win.
  • Codex review: Will request after open.
  • Copilot review: Will request after open.

The shutdown-manager container currently has default resource requests
but no limits. Clusters with LimitRange or strict resource policies can
inject an inappropriate limit, or users must patch via EnvoyProxy.

Set a 32Mi default memory limit, matching the existing request, and
leave CPU limits unset. User-overridden resources are unchanged.

Fixes envoyproxy#8912

Signed-off-by: yusheng.wang <[email protected]>
@wangyusheng1985
wangyusheng1985 requested a review from a team as a code owner October 8, 2026 07:14
@netlify

netlify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 8955609
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6ac854d9a059970008a8e041
😎 Deploy Preview https://deploy-preview-10221--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-08T07:15:43.415677Z f0f6ab7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zirain

zirain commented Oct 8, 2026

Copy link
Copy Markdown
Member

IIRC, there's similar PR in the past.
One more question I want to raise is should we allow users to cumstomize this default value?

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.55%. Comparing base (a66db41) to head (f0f6ab7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10221      +/-   ##
==========================================
+ Coverage   81.49%   81.55%   +0.05%     
==========================================
  Files         266      266              
  Lines       41409    41412       +3     
==========================================
+ Hits        33748    33775      +27     
+ Misses       7660     7636      -24     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

A 32Mi limit matching the request leaves no headroom for the preStop
drain child process, which caused EnvoyShutdown e2e failures
(connection resets during rollout).

Signed-off-by: yusheng.wang <[email protected]>
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add default memory limit for shutdown-manager container

2 participants