Repository navigation
docs(resource-management): instance-type resource presets - #535
Aleksei Sviridkin (lexfrei) merged 2 commits into
Conversation
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Resource Management guide's "Using Resource Presets" section is expanded with a concrete instance-type preset model, explicit legacy-to-instance-type mappings, deprecation warnings, and migration guidance pointing to authoritative sources. ChangesResource Presets Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the resource management documentation to introduce a new cloud-style naming convention (.) for resource presets, replacing the legacy flat naming scheme. It includes detailed tables for series ratios, CPU allocations per size, and a mapping for deprecated legacy presets. Review feedback identifies inconsistencies between the new preset values and existing examples in the document, and suggests applying backticks to technical values in the new tables for formatting consistency.
| | Size | CPU | | ||
| | ---------- | ---- | | ||
| | `nano` | 250m | | ||
| | `micro` | 500m | | ||
| | `small` | 1 | | ||
| | `medium` | 2 | | ||
| | `large` | 4 | | ||
| | `xlarge` | 8 | | ||
| | `2xlarge` | 16 | | ||
| | `4xlarge` | 32 | |
There was a problem hiding this comment.
The updated CPU values in this table (e.g., nano = 250m, small = 1) are inconsistent with the "Example 1" and "Example 2" tables at the end of this document (lines 172-192), which still use the deprecated values (nano = 100m, small = 500m). To avoid user confusion, those examples should also be updated to reflect the new preset definitions.
There was a problem hiding this comment.
The Example 1 and Example 2 tables were updated in 80e2101 (before this review fired) — they now use the t1.* names and the correct CPU values (250m, 500m, 1, 2, 4, 8, 16, 32 across rows nano through 4xlarge), so the inconsistency the comment names no longer exists on the current head. Diff: https://github.com/cozystack/website/pull/535/files#diff-c66a … see lines 174-196.
| | `t1` | 1:0.5 | Tiny / burstable, low memory | | ||
| | `c1` | 1:1 | Compute-balanced, CPU-bound workloads | | ||
| | `s1` | 1:2 | Standard — proxies, caches, lightweight services | | ||
| | `u1` | 1:4 | Universal — databases and messaging | | ||
| | `m1` | 1:8 | Memory-heavy — search, analytics, large caches | |
There was a problem hiding this comment.
For consistency with the previous version of the documentation and the rest of the file, please wrap the ratio values in backticks.
| | `t1` | 1:0.5 | Tiny / burstable, low memory | | |
| | `c1` | 1:1 | Compute-balanced, CPU-bound workloads | | |
| | `s1` | 1:2 | Standard — proxies, caches, lightweight services | | |
| | `u1` | 1:4 | Universal — databases and messaging | | |
| | `m1` | 1:8 | Memory-heavy — search, analytics, large caches | | |
| | `t1` | `1:0.5` | Tiny / burstable, low memory | | |
| | `c1` | `1:1` | Compute-balanced, CPU-bound workloads | | |
| | `s1` | `1:2` | Standard — proxies, caches, lightweight services | | |
| | `u1` | `1:4` | Universal — databases and messaging | | |
| | `m1` | `1:8` | Memory-heavy — search, analytics, large caches | |
There was a problem hiding this comment.
Addressed in 57f50a6. Ratio values now wrapped in backticks across all five series rows.
| | `nano` | 250m | | ||
| | `micro` | 500m | | ||
| | `small` | 1 | | ||
| | `medium` | 2 | | ||
| | `large` | 4 | | ||
| | `xlarge` | 8 | | ||
| | `2xlarge` | 16 | | ||
| | `4xlarge` | 32 | |
There was a problem hiding this comment.
Please wrap the CPU values in backticks to match the technical formatting style used in the previous version of this table.
| | `nano` | 250m | | |
| | `micro` | 500m | | |
| | `small` | 1 | | |
| | `medium` | 2 | | |
| | `large` | 4 | | |
| | `xlarge` | 8 | | |
| | `2xlarge` | 16 | | |
| | `4xlarge` | 32 | | |
| | `nano` | `250m` | | |
| | `micro` | `500m` | | |
| | `small` | `1` | | |
| | `medium` | `2` | | |
| | `large` | `4` | | |
| | `xlarge` | `8` | | |
| | `2xlarge` | `16` | | |
| | `4xlarge` | `32` | |
There was a problem hiding this comment.
Addressed in 57f50a6. CPU values in the size table are now wrapped in backticks for all eight rows.
| | `nano` | 250m | 128Mi | `t1.nano` | | ||
| | `micro` | 500m | 256Mi | `t1.micro` | | ||
| | `small` | 1 | 512Mi | `t1.small` | | ||
| | `medium` | 1 | 1Gi | `c1.small` | | ||
| | `large` | 2 | 2Gi | `c1.medium` | | ||
| | `xlarge` | 4 | 4Gi | `c1.large` | | ||
| | `2xlarge`| 8 | 8Gi | `c1.xlarge` | |
There was a problem hiding this comment.
Please use backticks for the CPU and memory values in the legacy mapping table for consistency. This also fixes the minor spacing issue in the last row.
| | `nano` | 250m | 128Mi | `t1.nano` | | |
| | `micro` | 500m | 256Mi | `t1.micro` | | |
| | `small` | 1 | 512Mi | `t1.small` | | |
| | `medium` | 1 | 1Gi | `c1.small` | | |
| | `large` | 2 | 2Gi | `c1.medium` | | |
| | `xlarge` | 4 | 4Gi | `c1.large` | | |
| | `2xlarge`| 8 | 8Gi | `c1.xlarge` | | |
| | `nano` | `250m` | `128Mi` | `t1.nano` | | |
| | `micro` | `500m` | `256Mi` | `t1.micro` | | |
| | `small` | `1` | `512Mi` | `t1.small` | | |
| | `medium` | `1` | `1Gi` | `c1.small` | | |
| | `large` | `2` | `2Gi` | `c1.medium` | | |
| | `xlarge` | `4` | `4Gi` | `c1.large` | | |
| | `2xlarge` | `8` | `8Gi` | `c1.xlarge` | |
There was a problem hiding this comment.
Addressed in 57f50a6. CPU and memory columns of the legacy mapping table are now wrapped in backticks, and column padding is rebalanced for the new widths.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@content/en/docs/next/guides/resource-management/_index.md`:
- Around line 39-63: The page contains conflicting preset CPU/memory values:
update all downstream tables and example rows to use the new canonical
CPU-per-size mapping (nano=250m, micro=500m, small=1, medium=2, large=4,
xlarge=8, 2xlarge=16, 4xlarge=32) and compute memory from the listed series
ratios (t1=1:0.5, c1=1:1, s1=1:2, u1=1:4, m1=1:8); locate and replace any
instances showing old values (e.g., places that currently say nano=100m or
medium=500m) so CPU and memory numbers across the Size table, the example
presets like `t1.small`, and any downstream matrices match the new scheme, and
ensure the ephemeral storage note remains 2Gi for every preset.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6df7a680-fb50-43ac-9dd0-3f741ed46ae4
📒 Files selected for processing (1)
content/en/docs/next/guides/resource-management/_index.md
b66e15b to
4c96e73
Compare
Update the resource-management guide to describe the new
`<series>.<size>` instance-type preset scheme:
- five series (t1, c1, s1, u1, m1) covering CPU:memory ratios from
1:0.5 to 1:8
- eight sizes (nano through 4xlarge) per series
- explicit callout that legacy `medium` (1 CPU / 1Gi) and new
`*.medium` (2 CPU) names overlap but resources do not
- 1:1 legacy-to-instance-type mapping table for the seven deprecated
flat names that remain accepted as aliases
- mention of the API-server deprecation warning and the platform
upgrade migration that rewrites stored values
Also correct CPU values in the prior table that disagreed with the
actual cozy-lib library (nano was listed as 100m / 128Mi but
cozy-lib has always rendered 250m / 128Mi for nano, and so on for
every row); pin the table on the values cozy-lib actually returns.
Track corresponding code change at cozystack/cozystack#2607.
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
4c96e73 to
80e2101
Compare
Address review feedback from gemini-code-assist on three threads against content/en/docs/next/guides/resource-management/_index.md (lines 47, 60 and the legacy mapping table). Wrap the ratio values in the series table, the CPU values in the size table, and the CPU plus memory columns of the legacy mapping table in backticks so they pick up the technical-formatting style the rest of the file already uses for code-like values. Signed-off-by: Aleksei Sviridkin <[email protected]>
What this PR does
Companion to cozystack/cozystack#2607.
Updates the resource-management guide to describe the new
<series>.<size>instance-type preset scheme rolled out across all Cozystack apps:t11:0.5,c11:1,s11:2,u11:4,m11:8) with eight sizes each.medium(1 CPU / 1Gi) and instance-type*.medium(2 CPU) names overlap but resources do not.Fixes pre-existing CPU drift in three tables on the same page
The previous tables listed
nano = 100m,micro = 250m,small = 500m, etc. — values that never matched whatcozy-libactually rendered. The library returnsnano = 250m / 128Mi,micro = 500m / 256Mi,small = 1 / 512Mi, and so on. Pin all three preset tables (the main one and bothcpu-allocation-ratioexample tables) on the values the library actually returns, and switch the example tables to instance-type names while we're there.Other cleanups
If both resources and resourcesPreset are defined, resource is used and resourcsePreset is ignored.(was missing the trailingsonresourceand hadresourcsePresetinstead ofresourcesPreset).Release note