Repository navigation
docs(apps): correct the shared resources and preset paragraphs - #4394
Aleksei Sviridkin (lexfrei) merged 1 commit into
Conversation
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]>
|
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 configurationConfiguration used: Repository: cozystack/cozystack/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (12)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe application READMEs clarify how ChangesResource preset documentation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to 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)
✨ 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 |
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
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:
- The generated parameter table in the same READMEs still says "When omitted, the preset defined in
resourcesPresetis applied." It comes from the@paramor@fieldcomment in eachvalues.yamland also goes intovalues.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 invalues.yamlplus a regenerate. - 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.
What this PR does
Corrects two sentences of the boilerplate shared by the app READMEs, both raised in the review of #3936.
resourcesPresetis applied" describes an all-or-nothing rule, butcozy-lib.resources.defaultingSanitizemerges per key: every resourceresourcesleaves unset is taken from the preset. Twelve READMEs carried the sentence.c1series listed just before it.nanothroughsmallequal thet1sizes, andmediumequalsc1.smallrather thanc1.medium, the trapdocs/operations/resource-presets.mdalready warns about. Ten READMEs carried the sentence.Only the hand-written section changes.
make generatefor 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
Summary by CodeRabbit
nano–smallmatchingt1sizes andmediummatchingc1.small.