Skip to content

docs(resource-management): instance-type resource presets - #535

Merged
Aleksei Sviridkin (lexfrei) merged 2 commits into
cozystack:mainfrom
lexfrei:feat/instance-type-presets
May 12, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 2 commits into
cozystack:mainfrom
lexfrei:feat/instance-type-presets

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Companion to cozystack/cozystack#2607.

Merge order: must land after cozystack/cozystack#2607. The new closing paragraph links to docs/operations/resource-presets.md in the cozystack repo, which is created by #2607 — the link 404s until #2607 is merged.

Updates the resource-management guide to describe the new <series>.<size> instance-type preset scheme rolled out across all Cozystack apps:

  • Five series covering the full CPU-to-memory ratio range (t1 1:0.5, c1 1:1, s1 1:2, u1 1:4, m1 1:8) with eight sizes each.
  • Explicit callout that legacy medium (1 CPU / 1Gi) and instance-type *.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 (Migration 39) that rewrites stored values.

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 what cozy-lib actually rendered. The library returns nano = 250m / 128Mi, micro = 500m / 256Mi, small = 1 / 512Mi, and so on. Pin all three preset tables (the main one and both cpu-allocation-ratio example tables) on the values the library actually returns, and switch the example tables to instance-type names while we're there.

Other cleanups

  • Fix typos in the line: If both resources and resourcesPreset are defined, resource is used and resourcsePreset is ignored. (was missing the trailing s on resource and had resourcsePreset instead of resourcesPreset).

Release note

docs(resource-management): describe instance-type preset scheme (t1/c1/s1/u1/m1 × 8 sizes), add legacy-to-instance-type mapping table, correct CPU values across all three preset tables to match the cozy-lib library.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@netlify

netlify Bot commented May 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit 57f50a6
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6a02711ab06b8c0008f69a0b
😎 Deploy Preview https://deploy-preview-535--cozystack.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.

@coderabbitai

coderabbitai Bot commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@lexfrei has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 53 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dbdd60dc-790d-42bf-bbb0-659c2cb4b185

📥 Commits

Reviewing files that changed from the base of the PR and between b66e15b and 57f50a6.

📒 Files selected for processing (1)
  • content/en/docs/next/guides/resource-management/_index.md
📝 Walkthrough

Walkthrough

The 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.

Changes

Resource Presets Documentation

Layer / File(s) Summary
Instance-Type Preset Model
content/en/docs/next/guides/resource-management/_index.md
Replaces minimal preset description with expanded t1.small example, full <series>.<size> naming model across CPU:memory ratio series, CPU-per-size table, memory/ephemeral storage guidance, and m CPU unit definition.
Legacy Preset Equivalence and Warnings
content/en/docs/next/guides/resource-management/_index.md
Adds warning that legacy medium differs from instance-type *.medium, introduces legacy-to-instance-type equivalence table, and documents API server deprecation warnings.
Migration Path
content/en/docs/next/guides/resource-management/_index.md
Documents Migration 39 that rewrites legacy preset values to instance-type equivalents in-place with idempotence guarantees and no resource changes.
Reference Updates
content/en/docs/next/guides/resource-management/_index.md
Updates references to point to cozy-lib library and canonical resource presets documentation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A preset by any other name,
From medium flat to t1 the same,
Instance types now crystal-clear,
With mappings, warnings, migration near—
Documentation hops with helpful cheer!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title directly and specifically describes the main change: documentation updates for instance-type resource presets, which is the core focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +51 to +60
| Size | CPU |
| ---------- | ---- |
| `nano` | 250m |
| `micro` | 500m |
| `small` | 1 |
| `medium` | 2 |
| `large` | 4 |
| `xlarge` | 8 |
| `2xlarge` | 16 |
| `4xlarge` | 32 |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +43 to +47
| `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 |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the previous version of the documentation and the rest of the file, please wrap the ratio values in backticks.

Suggested change
| `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 |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 57f50a6. Ratio values now wrapped in backticks across all five series rows.

Comment on lines +53 to +60
| `nano` | 250m |
| `micro` | 500m |
| `small` | 1 |
| `medium` | 2 |
| `large` | 4 |
| `xlarge` | 8 |
| `2xlarge` | 16 |
| `4xlarge` | 32 |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Please wrap the CPU values in backticks to match the technical formatting style used in the previous version of this table.

Suggested change
| `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` |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 57f50a6. CPU values in the size table are now wrapped in backticks for all eight rows.

Comment on lines +76 to +82
| `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` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
| `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` |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6ded60e and b66e15b.

📒 Files selected for processing (1)
  • content/en/docs/next/guides/resource-management/_index.md

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]>
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]>
@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 514a77a into cozystack:main May 12, 2026
6 checks passed
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