Skip to content

chore: memory requests and limits from measured usage (main) - #144

Merged
MusaMisto merged 1 commit into
mainfrom
chore/memory-limits-2026-10-06-main
Oct 6, 2026
Merged

MusaMisto merged 1 commit into
mainfrom
chore/memory-limits-2026-10-06-main

Conversation

@MusaMisto

Copy link
Copy Markdown
Member

Sets memory requests and limits from measured usage. Only resource lines change (1 file changed, 5 insertions(+), 1 deletion(-)).

where release values measured (whole Prometheus history)
Prod mtm (sf9-dev playground) requests.cpu=25m, requests.memory=176Mi, limits.memory=352Mi 36.0 d: p95 158 MiB, peak 170 MiB, cpu p95 0m

Rule (the same one used for every app since 2026-10-04): memory request = p95 × 1.1; memory limit = max(1.5 × peak, 2 × request, 128Mi); cpu request = p95 (floor 25m); no CPU limit.

What merging does: helm-set-values was a one-line quoted list. It is now a | block holding the same pairs plus the resource lines. reusable-service-cicd.yml joins the lines with commas (tr '\n' ','), so helm receives exactly the old pairs followed by the new ones. Merging into main builds and publishes a new image and chart from unchanged code, and deploys playground/mtm on sf9-dev. The values live in this workflow, not in the chart's values.yaml, so the published chart's defaults (used by the sbn *-mtm releases) do not change.

Checked before opening:

  • Rendered old vs new with the real chart. The manifests differ only in resources; the old values render no resources, which is the control.
  • A server-side dry-run on the live Deployment admitted these values; nothing was persisted.
  • Fits on the cluster's nodes, including the rollout surge, and no other Deployment loses room to roll out.

Revert: revert this commit; the next deploy restores the previous behaviour.

Context and evidence: simplify9/infrastructure-monitoring#176

🤖 Generated with Claude Code

Only resource lines. Context: simplify9/infrastructure-monitoring#176.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: simplify9/coderabbit/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d2797133-6830-4038-a586-ca2e15bf1f1e
📥 Commits

Reviewing files that changed from the base of the PR and between 0fe573b and 98426e0.

📒 Files selected for processing (1)
  • .github/workflows/ci-cd.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
Treat GitHub Actions changes as supply-chain sensitive.

⚙️ CodeRabbit configuration file

Files:

  • .github/workflows/ci-cd.yml
🔇 Additional comments (1)
.github/workflows/ci-cd.yml (1)

64-68: 🗄️ Data Integrity & Integration

The concern is refuted. The reusable workflow converts newline-separated values to commas before passing them to Helm, so the resource assignments remain separate from dbType.


📝 Summary
  • What changed: .github/workflows/ci-cd.yml now passes Helm values as a YAML block. It preserves the existing environment, replica count, and database type settings. It adds a CPU request of 25m, a memory request of 176Mi, and a memory limit of 352Mi.
  • Risk: risk:low. The change is limited to deployment resource settings for mtm.
  • Security-sensitive areas touched: None indicated by the change.
  • Test coverage impact: No test results or coverage changes are provided.
  • Deployment and operations: The new settings affect resources allocated to the deployment. The PR objectives report prior chart rendering and a server-side dry-run, but those checks are not independently verified here. No migration or rollback procedure is specified.

Walkthrough

The CI/CD workflow now passes Helm values as a YAML block. It retains the existing environment, replica count, and database type settings. It adds CPU and memory resource settings.

Changes

Helm configuration

Layer / File(s) Summary
Set Helm resource values
.github/workflows/ci-cd.yml
The workflow passes Helm values as a YAML block. It retains the existing settings and adds CPU request 25m, memory request 176Mi, and memory limit 352Mi.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested labels: infra, risk:high

Suggested reviewers: mmalkhatib

Merge Risk: ⚪ Minimal · up to 98426

No concrete deployment risk remains in the reviewed change; the existing Helm overrides are preserved and the new resource settings are passed through the reusable workflow.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the change: setting memory requests and limits from measured usage.
Description check ✅ Passed The description explains the resource settings, measured usage, deployment scope, validation, and revert path. It is directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MusaMisto
MusaMisto merged commit 9f3e9a1 into main Oct 6, 2026
5 checks passed
@MusaMisto
MusaMisto deleted the chore/memory-limits-2026-10-06-main branch October 6, 2026 13:42
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.

1 participant