Skip to content

docs(apps): correct the shared resources and preset paragraphs - #4394

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
cozystack:mainfrom
yankawai:docs/apps-shared-resources-paragraph
Sep 25, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
cozystack:mainfrom
yankawai:docs/apps-shared-resources-paragraph

Conversation

@yankawai

@yankawai europrinter (yankawai) commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Corrects two sentences of the boilerplate shared by the app READMEs, both raised in the review of #3936.

  • "When left empty, the preset defined in resourcesPreset is applied" describes an all-or-nothing rule, but cozy-lib.resources.defaultingSanitize merges per key: every resource resources leaves unset is taken from the preset. Twelve READMEs carried the sentence.
  • The legacy flat names were called aliases of their "1:1 instance-type equivalents", which reads as the c1 series listed just before it. nano through small equal the t1 sizes, and medium equals c1.small rather than c1.medium, the trap docs/operations/resource-presets.md already warns about. Ten READMEs carried the sentence.

Only the hand-written section changes. make generate for all twelve packages leaves the diff at exactly those 22 lines.

Screenshots

Not a UI change.

Downstream repositories

Walked the trigger map against the diff: README prose only, no values, schema, default or package change. The website regenerates the app reference pages from these READMEs on release, so nothing to open there.

Release note

NONE

Summary by CodeRabbit

  • Documentation
    • Clarified how resource settings work across several app READMEs: any unset resource field now inherits its value from the preset, rather than requiring the entire resource block to be empty.
    • Updated legacy preset name guidance to explain that deprecated flat names keep their original sizes, including nano–small matching t1 sizes and medium matching c1.small.

Two sentences of the boilerplate shared by the app READMEs were wrong.
"When left empty, the preset is applied" described an all-or-nothing
rule, but cozy-lib.resources.defaultingSanitize merges per key: every
resource that resources leaves unset comes from the preset. And the
legacy flat names were called aliases of their "1:1 instance-type
equivalents", which reads as the c1 series; nano through small match t1,
and medium matches c1.small rather than c1.medium, the trap
docs/operations/resource-presets.md already warns about.

Signed-off-by: Yan Bondarenko <[email protected]>
@github-actions github-actions Bot added area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/documentation Categorizes issue or PR as related to documentation size/M This PR changes 30-99 lines, ignoring generated files labels Sep 22, 2026
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: dd17bcdd-5c2d-42d7-90d5-adc51a728e35

📥 Commits

Reviewing files that changed from the base of the PR and between 0f21d06 and cdcb271.

📒 Files selected for processing (12)
  • packages/apps/clickhouse/README.md
  • packages/apps/kafka/README.md
  • packages/apps/kubernetes/README.md
  • packages/apps/mariadb/README.md
  • packages/apps/nats/README.md
  • packages/apps/postgres/README.md
  • packages/apps/qdrant/README.md
  • packages/apps/rabbitmq/README.md
  • packages/apps/redis/README.md
  • packages/apps/tcp-balancer/README.md
  • packages/apps/valkey/README.md
  • packages/apps/vpn/README.md

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The application READMEs clarify how resourcesPreset supplies unset resource values. They also specify the sizes represented by legacy flat preset aliases. No functional changes are described.

Changes

Resource preset documentation

Layer / File(s) Summary
Resource fallback and legacy alias descriptions
packages/apps/*/README.md
The READMEs state that resourcesPreset supplies each unset resource value. They clarify that nano through small match same-named t1 sizes, while medium matches c1.small, not c1.medium. One README documents only the fallback clarification.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to cdcb2

The README clarifications match the supplied shared-template behavior, and the changes introduce no actionable merge risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'docs(apps): correct the shared resources and preset paragraphs' directly and accurately describes the main change. The changeset consists of 12 documentation-only updates acros…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

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.

europrinter (@yankawai) LGTM. Both corrected sentences match what the charts render at this head.

Business context: the shared resources section of the app READMEs said the preset applies only when resources is empty, and implied the legacy flat names map onto the c1 series. This PR fixes both.

I checked the merge claim in every chart. All twelve render resources through cozy-lib.resources.defaultingSanitize, including the kafka broker KafkaNodePool in migration-hook.yaml and the four kubernetes control-plane components. That helper does deepCopy $resources | mergeOverwrite $presetMap, so each key missing from resources comes from the preset.

The legacy sizes are right too. In _resourcepresets.tpl, nano, micro and small carry the same values as the t1 sizes, and medium is 1 CPU / 1Gi, which is c1.small. That agrees with the migration table in docs/operations/resource-presets.md.

The edited section is hand-written and sits below the generated parameters block. Regenerating all twelve READMEs with cozyvalues-gen gives the same files byte for byte.

Non-blocking:

  1. The generated parameter table in the same READMEs still says "When omitted, the preset defined in resourcesPreset is applied." It comes from the @param or @field comment in each values.yaml and also goes into values.schema.json, so the dashboard shows it. It is not false, but it doesn't mention the per-key merge. Fixing it is a separate change in values.yaml plus a regenerate.
  2. The first paragraph of the section is still split over two lines. This PR touches that paragraph, so it could be joined into one line.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 09d02fd into cozystack:main Sep 25, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/documentation Categorizes issue or PR as related to documentation size/M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants