Skip to content

[apps] Refactor resources - #1106

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
refactor-resources
Jun 24, 2025
Merged

[apps] Refactor resources#1106
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
refactor-resources

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Jun 24, 2025

Copy link
Copy Markdown
Member

Signed-off-by: Andrei Kvapil kvapss@gmail.com

Summary by CodeRabbit

  • Documentation

    • Clarified and simplified descriptions for the resourcesPreset parameter across all app documentation, emphasizing it is used only when resources is not explicitly set and listing allowed values.
    • Reformatted and improved consistency in parameter tables and comments for better readability.
  • Style

    • Simplified commented examples for resource configuration in values files, using flat CPU and memory entries instead of nested structures.
  • Chores

    • Incremented chart versions for multiple applications.
    • Updated version mappings to reflect new patch releases.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This update standardizes and clarifies resource configuration documentation and examples across multiple application Helm charts. It simplifies commented examples for resource limits, rewords descriptions for resourcesPreset parameters, and explicitly lists allowed preset values. Additionally, chart versions and version mappings are incremented for several applications, with no functional changes to configuration logic.

Changes

Files/Groups Change Summary
.../values.yaml (all apps) Simplified commented resource examples; reworded resourcesPreset descriptions for clarity and consistency.
.../README.md (all apps) Updated documentation tables/descriptions for resourcesPreset to clarify usage and allowed values.
.../values.schema.json (all apps) Revised JSON schema descriptions for resourcesPreset to clarify usage, list allowed values, and remove recommendations.
.../Chart.yaml (all apps) Incremented chart version numbers for each application.
packages/apps/versions_map Updated version mappings: replaced "HEAD" placeholders with commit hashes and added new "HEAD" entries for patches.
.../values.yaml (Kubernetes) Additionally, explicitly enumerated allowed resourcesPreset values in comments for control plane components.

Sequence Diagram(s)

Not applicable: The changes are documentation and comment updates, with no new features or control flow modifications.

Possibly related PRs

Suggested labels

enhancement, size:M

Suggested reviewers

  • lllamnyp

Poem

A rabbit hopped through YAML fields,
Tidying docs and resource shields.
From nested keys to comments neat,
Preset values now complete!
Charts updated, docs aligned—
In code and prose, all redefined.
🐇✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@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: 8

♻️ Duplicate comments (1)
packages/apps/kubernetes/values.yaml (1)

126-135: Same comment as for apiServer applies to controllerManager & scheduler blocks

Ensure the chosen example format (flat vs. limits/requests) is consistent across all control-plane components.

🧹 Nitpick comments (33)
packages/apps/clickhouse/values.yaml (2)

50-55: Simplified example likely mis-guides users if the chart still expects limits/requests nesting

Helm charts typically render the resources block directly into the container spec, which in Kubernetes must be structured as:

resources:
  limits:
    cpu: 4000m
    memory: 4Gi
  requests:
    cpu: 400m
    memory: 512Mi

The new example shows flat cpu/memory keys. Unless the templates were refactored to map these keys internally, this comment could confuse users and lead to invalid manifests. Please confirm that:

  1. values.yaml schema and templates were updated to accept the flat shape, or
  2. Retain the canonical nested example and add a note if shorthand is supported.

56-57: Enumerate accepted resourcesPreset values for discoverability

The comment above mentions presets (e.g., "small"), but users have no visibility into the valid options without diving into the templates. Adding the allowed preset names (tiny, small, medium, large, etc.) right here or linking to documentation will improve UX and prevent typos.

packages/apps/rabbitmq/values.yaml (2)

46-48: Remove trailing whitespace to satisfy YAML lint

yamllint flagged trailing spaces on these comment lines. While harmless at runtime, they fail strict linters and CI.

- #   cpu: 4000m␠
- #   memory: 4Gi␠
+ #   cpu: 4000m
+ #   memory: 4Gi

49-50: Minor wording tweak for consistency

Elsewhere in the repo preset names are wrapped in back-ticks for readability.

-## @param resourcesPreset Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)
+## @param resourcesPreset Use a common resources preset when `resources` is not set explicitly. (allowed values: `none`, `nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`)
packages/apps/rabbitmq/README.md (1)

25-31: Table still renders, but back-ticks aid copy-paste

Consider formatting preset names with back-ticks, mirroring the change suggested in values.yaml, to make them stand out and reduce copy errors.

-| `resourcesPreset` | Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge) | `nano` |
+| `resourcesPreset` | Use a common resources preset when `resources` is not set explicitly. (allowed values: `none`, `nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`) | `nano` |
packages/apps/redis/values.yaml (2)

18-20: Remove trailing whitespace to satisfy YAML lint
Lines 18-19 contain trailing spaces flagged by yamllint. Delete the extra spaces to keep CI green.

- #   cpu: 4000m␠
- #   memory: 4Gi␠
+ #   cpu: 4000m
+ #   memory: 4Gi

17-20: Example resource block may mislead users
The simplified example shows cpu / memory directly under resources, which is not a valid Kubernetes resources object (expects limits / requests). Unless templates have been adapted to handle this custom shape, users copy-pasting the snippet will hit rendering errors.

Consider restoring the canonical structure or adding a clarifying comment:

# resources:
#   limits:
#     cpu: 4000m
#     memory: 4Gi
#   requests:
#     cpu: 500m
#     memory: 128Mi
packages/apps/nats/Chart.yaml (1)

19-19: Chart version bump looks good – don’t forget the CHANGELOG

version has been correctly incremented to 0.7.1.
Please ensure a matching entry is added to the project-wide CHANGELOG so downstream consumers can trace the patch.

packages/apps/nats/values.yaml (1)

71-72: Consider adding an enum to the JSON-schema for stronger validation

resourcesPreset is documented with an allowed list but the schema does not enforce it.
Adding an enum array in values.schema.json will give immediate feedback on typos:

         "resourcesPreset": {
             "type": "string",
             "description": "...",
-            "default": "nano"
+            "default": "nano",
+            "enum": ["none","nano","micro","small","medium","large","xlarge","2xlarge"]
         }
packages/apps/nats/README.md (1)

7-18: Documentation table updated – ensure width rendering remains intact

The long description for resourcesPreset may overflow on narrow Markdown viewers, causing table wrap issues.
Consider breaking the sentence or moving allowed values to a separate “Allowed values” column/section for readability.

packages/apps/nats/values.schema.json (1)

55-58: Schema description in sync – add enum for parity with docs

See prior comment in values.yaml; adding an enum here would enforce the documented allowed values and prevent invalid presets at validation time.

packages/apps/http-cache/values.yaml (1)

21-22: Consider restoring a minimal description for resourcesPreset

The comment now only lists allowed values; adding a short purpose description (e.g., “Predefined CPU/memory sizes”) would improve clarity without re-introducing verbosity.

Also applies to: 31-32

packages/apps/http-cache/README.md (1)

70-72: Missing description cell breaks the parameters table

haproxy.resources currently has an empty Description column, causing an uneven table and possible markdown render issues.

-| `haproxy.resources`       |                                                                                                                                                  | `{}`    |
+| `haproxy.resources`       | CPU/Memory resources map                                                                                                                         | `{}`    |

Apply the same fix for nginx.resources below.

packages/apps/http-cache/values.schema.json (1)

28-32: Empty string in JSON-Schema description is noisy

An empty description adds no value and clutters generated docs. Either supply a meaningful sentence or drop the description field entirely.

-                "resources": {
-                    "type": "object",
-                    "description": "",
-                    "default": {}
-                },
+                "resources": {
+                    "type": "object",
+                    "description": "CPU/Memory resources map",
+                    "default": {}
+                },
packages/apps/kubernetes/values.yaml (1)

118-121: Example resource format now diverges from README

Here the example shows a flat structure:

resources:
  cpu: 4000m
  memory: 4Gi

…but the README (lines 124-135) still demonstrates the traditional requests/limits structure.
Please make the two examples consistent to avoid user confusion.

-##   cpu: 4000m
-##   memory: 4Gi
+##   limits:
+##     cpu: 4000m
+##     memory: 4Gi
+##   requests:
+##     cpu: 100m
+##     memory: 512Mi
packages/apps/postgres/values.yaml (1)

93-95: Trailing whitespace & potentially misleading example

  1. Line 95 is flagged by YAMLlint for trailing spaces – please trim.
  2. The commented-out example now shows cpu/memory directly under resources. Most templates expect the canonical Kubernetes limits / requests structure, e.g.:
resources:
  limits:
    cpu: 4000m
    memory: 4Gi

If the chart’s templates still expect that shape, the simplified example may mislead users. Verify the template rendering; if limits/requests are still required, restore the original hierarchy or add an explanatory note.

packages/apps/postgres/values.schema.json (1)

125-129: Consider enforcing allowed presets via an enum

The description lists allowed values but the schema does not declare an "enum" array. Adding it would give consumers (e.g., IDE autocompletion, CI validation) stronger guarantees:

         "resourcesPreset": {
             "type": "string",
-            "description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
+            "description": "Use a common resources preset when `resources` is not set explicitly.",
+            "enum": ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"],
             "default": "micro"
         }
packages/apps/postgres/README.md (1)

73-80: Section misplacement

resources and resourcesPreset rows were appended under the Bootstrap parameters table. They are unrelated to bootstrapping and probably belong to their own “Resources parameters” section (or “Common parameters”). Moving them prevents confusion when scanning the docs.

packages/apps/kafka/values.yaml (1)

36-37: Keep comment width consistent
Minor nit: wrap comment text at ~120 chars to avoid horizontal scrolling in many editors.

packages/apps/tcp-balancer/values.yaml (1)

53-54: Description now clearer – consider enum validation

Great simplification of the resourcesPreset explanation.
Since you explicitly list the allowed preset values, consider adding enum: to values.schema.json for stronger client-side validation (json-schema & Helm plugin users).

packages/apps/tcp-balancer/README.md (1)

22-32: Table aligns with values.yaml – minor nit

The wording is crisp; however, there are two consecutive spaces in “enabling client networks whitelisting” which render a visual gap in Markdown tables.
Not critical, but worth trimming in the next doc sweep for consistency.

packages/apps/ferretdb/values.yaml (2)

55-57: Strip trailing whitespace flagged by YAML lint

YAMLlint reports trailing spaces on line 57. Cleaning them up keeps the repo lint-clean.

- #   memory: 4Gi␠
+ #   memory: 4Gi

58-59: Schema and values file may drift on allowed preset values

The comment now explicitly lists the allowed presets. Consider enforcing the same list in values.schema.json via an enum field to give users immediate validation feedback.

       "resourcesPreset": {
         "type": "string",
-        "description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
+        "description": "Use a common resources preset when `resources` is not set explicitly.",
+        "enum": ["none","nano","micro","small","medium","large","xlarge","2xlarge"],
         "default": "nano"
       }
packages/apps/ferretdb/README.md (1)

24-33: Correct typo “pereiodic” in backup description

Typo spotted in the updated table.

-| `backup.enabled`         | Enable pereiodic backups                                                         | `false` |
+| `backup.enabled`         | Enable periodic backups                                                          | `false` |
packages/apps/ferretdb/values.schema.json (1)

90-93: Consider adding enum to reinforce allowed presets at schema level

The description calls out specific allowed values but the schema does not validate them. Enforcing the list prevents typos and mis-configuration.

-        "description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
+        "description": "Use a common resources preset when `resources` is not set explicitly.",
+        "enum": ["none","nano","micro","small","medium","large","xlarge","2xlarge"],
packages/apps/versions_map (1)

97-97: Possible missing 0.15.0 entry for postgres

postgres lists 0.14.0 (pinned) and then 0.15.1 (HEAD).
Unless 0.15.0 was deliberately skipped, please add it (even if it immediately points to the same hash) to keep version history complete.

packages/apps/mysql/README.md (2)

88-88: Fix typo: “pereiodic” → “periodic”

-| `backup.enabled`         | Enable pereiodic backups                                                         | `false` |
+| `backup.enabled`         | Enable periodic backups                                                          | `false` |

96-97: Consider validating resourcesPreset values

The table documents an allowed list, but the chart’s JSON schema (and templates) do not currently enforce it. Users can still pass an unsupported string, leading to silent mis-configuration at deploy time.
Adding explicit validation (enum) in values.schema.json will catch mistakes early.

packages/apps/mysql/values.yaml (2)

61-63: Remove trailing spaces to satisfy YAML lint

Line 63 contains only whitespace, triggering trailing-spaces lint errors.

- #   memory: 4Gi␠␠
+ #   memory: 4Gi

64-64: Docs vs schema mismatch for resourcesPreset

The comment advertises a fixed set of presets, but the schema does not enforce them. Either:

  1. Add an enum in values.schema.json (preferred), or
  2. Remove the allowed-values note here.

Keeping them in sync avoids user confusion.

packages/apps/vpn/values.yaml (2)

39-40: Keep schema / values in sync with allowed presets.

The comment lists explicit allowed values, but the JSON schema does not enforce
them (see separate comment). Consider referencing the enum there to avoid
configuration typos slipping through.


34-40: ```shell
#!/usr/bin/env bash

Search for any nested resources usage in the vpn chart templates

rg -n ".Values.resources.(requests|limits)" packages/apps/vpn


</blockquote></details>
<details>
<summary>packages/apps/vpn/README.md (1)</summary><blockquote>

`25-32`: **Good doc simplification – replicate the allowed-values table across all charts.**

Nice tightening of the explanation for `resourcesPreset`.  
To maintain cross-chart consistency, ensure every app README got the exact same wording (including the allowed value list) so users don’t have to cross-compare.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 86fdb51236e0f697e8b75b9e29ddb63002614c73 and 654778a0c796363a4225f63ac47acc9641619116.

</details>

<details>
<summary>📒 Files selected for processing (45)</summary>

* `packages/apps/clickhouse/values.yaml` (1 hunks)
* `packages/apps/ferretdb/Chart.yaml` (1 hunks)
* `packages/apps/ferretdb/README.md` (1 hunks)
* `packages/apps/ferretdb/values.schema.json` (1 hunks)
* `packages/apps/ferretdb/values.yaml` (1 hunks)
* `packages/apps/http-cache/Chart.yaml` (1 hunks)
* `packages/apps/http-cache/README.md` (1 hunks)
* `packages/apps/http-cache/values.schema.json` (2 hunks)
* `packages/apps/http-cache/values.yaml` (1 hunks)
* `packages/apps/kafka/README.md` (1 hunks)
* `packages/apps/kafka/values.schema.json` (2 hunks)
* `packages/apps/kafka/values.yaml` (2 hunks)
* `packages/apps/kubernetes/Chart.yaml` (1 hunks)
* `packages/apps/kubernetes/README.md` (1 hunks)
* `packages/apps/kubernetes/values.schema.json` (4 hunks)
* `packages/apps/kubernetes/values.yaml` (1 hunks)
* `packages/apps/mysql/Chart.yaml` (1 hunks)
* `packages/apps/mysql/README.md` (1 hunks)
* `packages/apps/mysql/values.schema.json` (1 hunks)
* `packages/apps/mysql/values.yaml` (1 hunks)
* `packages/apps/nats/Chart.yaml` (1 hunks)
* `packages/apps/nats/README.md` (1 hunks)
* `packages/apps/nats/values.schema.json` (1 hunks)
* `packages/apps/nats/values.yaml` (1 hunks)
* `packages/apps/postgres/Chart.yaml` (1 hunks)
* `packages/apps/postgres/README.md` (1 hunks)
* `packages/apps/postgres/values.schema.json` (1 hunks)
* `packages/apps/postgres/values.yaml` (1 hunks)
* `packages/apps/rabbitmq/Chart.yaml` (1 hunks)
* `packages/apps/rabbitmq/README.md` (1 hunks)
* `packages/apps/rabbitmq/values.schema.json` (1 hunks)
* `packages/apps/rabbitmq/values.yaml` (1 hunks)
* `packages/apps/redis/Chart.yaml` (1 hunks)
* `packages/apps/redis/README.md` (1 hunks)
* `packages/apps/redis/values.schema.json` (1 hunks)
* `packages/apps/redis/values.yaml` (1 hunks)
* `packages/apps/tcp-balancer/Chart.yaml` (1 hunks)
* `packages/apps/tcp-balancer/README.md` (1 hunks)
* `packages/apps/tcp-balancer/values.schema.json` (1 hunks)
* `packages/apps/tcp-balancer/values.yaml` (1 hunks)
* `packages/apps/versions_map` (8 hunks)
* `packages/apps/vpn/Chart.yaml` (1 hunks)
* `packages/apps/vpn/README.md` (1 hunks)
* `packages/apps/vpn/values.schema.json` (1 hunks)
* `packages/apps/vpn/values.yaml` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 YAMLlint (1.37.1)</summary>

<details>
<summary>packages/apps/ferretdb/values.yaml</summary>

[error] 57-57: trailing spaces

(trailing-spaces)

</details>
<details>
<summary>packages/apps/postgres/values.yaml</summary>

[error] 95-95: trailing spaces

(trailing-spaces)

</details>
<details>
<summary>packages/apps/nats/values.yaml</summary>

[error] 70-70: trailing spaces

(trailing-spaces)

</details>
<details>
<summary>packages/apps/mysql/values.yaml</summary>

[error] 63-63: trailing spaces

(trailing-spaces)

</details>
<details>
<summary>packages/apps/redis/values.yaml</summary>

[error] 20-20: trailing spaces

(trailing-spaces)

</details>
<details>
<summary>packages/apps/http-cache/values.yaml</summary>

[error] 15-15: trailing spaces

(trailing-spaces)

---

[error] 20-20: trailing spaces

(trailing-spaces)

---

[error] 30-30: trailing spaces

(trailing-spaces)

</details>
<details>
<summary>packages/apps/rabbitmq/values.yaml</summary>

[error] 48-48: trailing spaces

(trailing-spaces)

</details>
<details>
<summary>packages/apps/kafka/values.yaml</summary>

[error] 22-22: trailing spaces

(trailing-spaces)

---

[error] 35-35: trailing spaces

(trailing-spaces)

</details>

</details>
<details>
<summary>🪛 GitHub Actions: Pre-Commit Checks</summary>

<details>
<summary>packages/apps/tcp-balancer/values.schema.json</summary>

[error] 1-1: File 'values.schema.json.tmp' not found when running 'cat values.schema.json.tmp | jq ... > values.schema.json'. This caused failure in make generate step.

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: Build

</details>

<details>
<summary>🔇 Additional comments (25)</summary><blockquote>

<details>
<summary>packages/apps/rabbitmq/Chart.yaml (1)</summary>

`19-19`: **Version bump looks good**

Chart version correctly incremented to `0.7.1` following SemVer. No further action required.

</details>
<details>
<summary>packages/apps/rabbitmq/values.schema.json (1)</summary>

`37-38`: **Schema description update matches docs**

Description now aligns with the simplified wording in `values.yaml` and `README.md`. Looks good.

</details>
<details>
<summary>packages/apps/redis/Chart.yaml (1)</summary>

`19-19`: **Patch-level version bump LGTM**  
The chart version increment is consistent with a non-breaking documentation change. No further action required.

</details>
<details>
<summary>packages/apps/redis/values.yaml (1)</summary>

`21-22`: **Clarified `resourcesPreset` wording looks good**  
The updated description accurately states the fallback behaviour and lists allowed values. No concerns.

</details>
<details>
<summary>packages/apps/redis/README.md (1)</summary>

`23-25`: **Documentation update approved**  
The rewritten note for `resourcesPreset` is clearer and consistent with `values.yaml` / JSON schema. Nice cleanup.

</details>
<details>
<summary>packages/apps/redis/values.schema.json (1)</summary>

`37-38`: **Schema description aligns with README/values.yaml**  
The simplified wording keeps the spec authoritative and avoids redundant advice. Looks good.

</details>
<details>
<summary>packages/apps/nats/values.yaml (1)</summary>

`65-70`: **Example no longer reflects Kubernetes resource structure – double-check template expectations**

The commented example was flattened to two scalar keys (`cpu`, `memory`).  
Standard Kubernetes manifests expect:

```yaml
resources:
  limits:
    cpu: 4000m
    memory: 4Gi
  requests:
    cpu: 2000m
    memory: 2Gi

If the chart’s templates still assume the canonical limits/requests layout, end-users copying this example will deploy invalid manifests.
Verify the Helm templates; either revert to the nested example or update the templates & schema to accept the flat form.

packages/apps/http-cache/Chart.yaml (1)

19-19: Chart patch-level bump LGTM

The version increment to 0.5.2 is semantically correct for a documentation-only change.

packages/apps/kubernetes/Chart.yaml (1)

19-19: Patch bump LGTM – please double-check whether appVersion should track a related change

version has been incremented from 0.24.10.24.2, which is perfectly in line with a doc-only change.
If the underlying application (appVersion) also moved forward you may want to bump it as well; otherwise everything is fine.

packages/apps/kubernetes/values.yaml (1)

114-121: Good call – allowed preset values are now explicit

Explicitly listing the eight supported resourcesPreset values clarifies usage and prevents invalid input. 👍

packages/apps/kubernetes/README.md (1)

113-122: Table update is clear, but verify wording consistency across docs

The parameter table now mirrors the new description with the explicit value list – great.
Minor: the sentence “This value is ignored if the corresponding resources value is set.” (line 138-139) still exists and is useful; make sure the same note wasn’t accidentally removed from the comments in values.yaml.

packages/apps/kubernetes/values.schema.json (1)

26-39: Schema descriptions updated – matches the docs

Descriptions now enumerate the eight allowed presets, matching the existing enum lists. No further action required.

Also applies to: 51-64, 76-89, 104-118

packages/apps/postgres/Chart.yaml (1)

19-20: Chart version bump looks correct
Patch-level increment (0.15.00.15.1) is appropriate because the PR is doc-only and does not introduce breaking changes or new features.

packages/apps/postgres/values.yaml (1)

96-97: Description update is fine
New wording clarifies the precedence between resources and resourcesPreset; no further action needed.

packages/apps/kafka/README.md (1)

7-19: Looks good – wording now consistent across charts
The new wording clarifies when the preset is applied and explicitly lists allowed values – nice alignment with the other charts.

packages/apps/kafka/values.yaml (1)

23-24: Example shape may no longer match K8s resources object
If the templates still expect the canonical

resources:
  limits:
    cpu: 
  requests:
    

structure, this flattened example will confuse users. Confirm that the chart accepts the simplified form; otherwise, revert to the canonical example.

packages/apps/tcp-balancer/Chart.yaml (1)

19-19: Chart version bump looks correct

Chart version was incremented to 0.4.2 with no other manifest changes – this is the minimum required change when templates/docs are updated.
Remember to add a matching entry in the chart’s CHANGELOG.md (if maintained) so downstream consumers can track what changed.

packages/apps/tcp-balancer/values.yaml (1)

50-53: Verify resource-example format matches templating logic

The commented example was flattened from the canonical Kubernetes structure:

resources:
  #   cpu: 4000m
  #   memory: 4Gi

If the templates still expect the standard requests/limits nesting, users copying this snippet will end up with invalid manifests.
Please confirm the templates render these flat keys, or revert to the nested example for accuracy.

packages/apps/tcp-balancer/values.schema.json (1)

68-70: ```shell
#!/bin/bash
set -e

echo "🔍 Searching for values.schema.json.tmp in tcp-balancer package..."
find packages/apps/tcp-balancer -type f -name 'values.schema.json.tmp' -print || echo "⚠️ Not found"

echo
echo "📂 Listing all .tmp files in the repo..."
find . -type f -name '*.tmp' | sed 's/^/ - /' || echo "No .tmp files found"

echo
echo "📝 Checking for a 'generate' target in the Makefile..."
grep -R "generate" -n Makefile || echo "Makefile or 'generate' target not found"


</details>
<details>
<summary>packages/apps/ferretdb/Chart.yaml (1)</summary>

`19-19`: **Chart patch-level bump looks good**

The version increment to `0.7.1` is consistent with a documentation-only change. No further action required.

</details>
<details>
<summary>packages/apps/versions_map (3)</summary>

`53-53`: **Gap in version sequence – was 0.24.1 intentionally skipped?**

`kubernetes` jumps from 0.24.0 → 0.24.2 (`HEAD`).  
If 0.24.1 was ever tagged or merged separately, it should appear here; otherwise, consider bumping to 0.24.1 to avoid confusion for downstream tooling that expects monotonic sequences.

---

`65-66`: **Sequence & hash consistency look good**

`mysql`, `nats`, `rabbitmq`, `redis`, `tcp-balancer`, and `vpn` all follow the expected pattern: pin the just-released version to `62cb694d` and create the next `HEAD` placeholder. No issues spotted here.  



Also applies to: 76-77, 108-109, 119-120, 125-126, 167-168

---

`27-36`: ```shell
#!/bin/bash
set -euo pipefail

for pkg in ferretdb http-cache; do
  chart_file=$(fd -t f "^Chart.yaml$" "packages/apps/$pkg" | head -n1)
  echo "📦 $pkg → $(basename "$chart_file")"
  grep -E '^(version|appVersion):' "$chart_file"
  echo
done
packages/apps/mysql/Chart.yaml (1)

19-19: Chart version bump looks good

Patch-level increment to 0.8.1 is appropriate for non-functional doc updates.
Please remember to regenerate/commit Chart.lock (if present) and update any CHANGELOG release notes so that downstream automation picks up the new version.

packages/apps/vpn/Chart.yaml (1)

17-20: ```shell
#!/usr/bin/env bash

Check for CHANGELOG.md presence and entries for version 0.6.2

fd -t f -i CHANGELOG.md || echo "No CHANGELOG.md found"
grep -R "0\.6\.2" -n CHANGELOG.md || echo "No entry for 0.6.2 in CHANGELOG.md"


</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment on lines +68 to 70
# cpu: 4000m
# memory: 4Gi

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.

⚠️ Potential issue

Trailing whitespace violates YAMLlint rule

values.yaml currently trips the trailing-spaces rule (see static-analysis hint).
Strip the extra spaces to keep the file linter-clean.

- #   cpu: 4000m␠
- #   memory: 4Gi␠
+ #   cpu: 4000m
+ #   memory: 4Gi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# cpu: 4000m
# memory: 4Gi
# cpu: 4000m
# memory: 4Gi
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 70-70: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In packages/apps/nats/values.yaml around lines 68 to 70, there are trailing
spaces after the commented resource limits. Remove any trailing whitespace at
the end of these lines to comply with the YAMLlint trailing-spaces rule and keep
the file clean.

Comment on lines +15 to 20
## @param haproxy.resources
resources: {}
# resources:
# limits:
# cpu: 4000m
# memory: 4Gi
# requests:
# cpu: 100m
# memory: 512Mi
# cpu: 4000m
# memory: 4Gi

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.

⚠️ Potential issue

YAML-lint fails due to trailing spaces — remove them

yamllint reports trailing whitespace on the marked lines. CI will fail until these are cleaned.

-  ## @param haproxy.resources␠
+  ## @param haproxy.resources
 ...
-  #   cpu: 4000m␠
+  #   cpu: 4000m
-  #   memory: 4Gi␠
+  #   memory: 4Gi
 ...
-  #   cpu: 4000m␠
+  #   cpu: 4000m
-  #   memory: 4Gi␠
+  #   memory: 4Gi

Also applies to: 28-30

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 15-15: trailing spaces

(trailing-spaces)


[error] 20-20: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In packages/apps/http-cache/values.yaml around lines 15 to 20 and also lines 28
to 30, there are trailing spaces causing yamllint to fail. Remove all trailing
whitespace characters at the end of these lines to fix the linting errors and
ensure the CI passes.

Comment on lines 63 to 67
"resourcesPreset": {
"type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
"default": "small"
}

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.

🛠️ Refactor suggestion

Duplicate of comment above – apply enum to Zookeeper block as well

🤖 Prompt for AI Agents
In packages/apps/kafka/values.schema.json around lines 63 to 67, the
"resourcesPreset" property defines allowed values in the description but lacks
an explicit "enum" array to enforce these values. Add an "enum" field listing
the allowed values (none, nano, micro, small, medium, large, xlarge, 2xlarge) to
the "resourcesPreset" property in the Zookeeper block as well to ensure schema
validation enforces these options.

Comment on lines 33 to 37
"resourcesPreset": {
"type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
"default": "small"
}

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.

🛠️ Refactor suggestion

Add enum to enforce the “allowed values” you document
The description lists eight allowed presets, but nothing in the schema prevents a misspelling such as "smal" from passing validation.

                 "resourcesPreset": {
                     "type": "string",
-                    "description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
+                    "description": "Use a common resources preset when `resources` is not set explicitly.",
+                    "enum": ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"],
                     "default": "small"
                 }

Apply the same change to the zookeeper.resourcesPreset block below to keep the schema self-validating.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"resourcesPreset": {
"type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
"default": "small"
}
"resourcesPreset": {
"type": "string",
"description": "Use a common resources preset when `resources` is not set explicitly.",
"enum": ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"],
"default": "small"
}
🤖 Prompt for AI Agents
In packages/apps/kafka/values.schema.json around lines 33 to 37, add an "enum"
property to the "resourcesPreset" schema to explicitly list the allowed string
values ("none", "nano", "micro", "small", "medium", "large", "xlarge",
"2xlarge") to enforce validation against misspellings. Then, locate the
"zookeeper.resourcesPreset" block further down in the file and apply the same
"enum" property with the identical allowed values to ensure consistent
self-validation for both fields.

Comment on lines +33 to 35
# cpu: 4000m
# memory: 4Gi

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.

⚠️ Potential issue

Trailing spaces – same issue as above
Line 35 ends with unnecessary spaces.

-  #   memory: 4Gi  
+  #   memory: 4Gi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# cpu: 4000m
# memory: 4Gi
# cpu: 4000m
# memory: 4Gi
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 35-35: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In packages/apps/kafka/values.yaml at line 35, remove the trailing spaces at the
end of the line to clean up unnecessary whitespace.

Comment on lines +20 to 22
# cpu: 4000m
# memory: 4Gi

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.

⚠️ Potential issue

Trailing spaces flagged by YAML-lint
Lines 21 – 22 contain extra whitespace, causing lint errors.

-  #   cpu: 4000m
-  #   memory: 4Gi  
+  #   cpu: 4000m
+  #   memory: 4Gi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# cpu: 4000m
# memory: 4Gi
# cpu: 4000m
# memory: 4Gi
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 22-22: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In packages/apps/kafka/values.yaml at lines 20 to 22, remove the trailing spaces
at the end of lines 21 and 22 to fix the YAML lint errors caused by extra
whitespace.

Comment on lines 75 to 78
"resourcesPreset": {
"type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
"default": "nano"

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.

⚠️ Potential issue

Schema should restrict resourcesPreset to the documented allowed values

Without an enum, any arbitrary string is accepted, potentially breaking template rendering.

 "resourcesPreset": {
   "type": "string",
-  "description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
+  "description": "Use a common resources preset when `resources` is not set explicitly.",
+  "enum": ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"],
   "default": "nano"
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"resourcesPreset": {
"type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
"default": "nano"
"resourcesPreset": {
"type": "string",
"description": "Use a common resources preset when `resources` is not set explicitly.",
"enum": ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"],
"default": "nano"
}
🤖 Prompt for AI Agents
In packages/apps/mysql/values.schema.json around lines 75 to 78, the
resourcesPreset property is defined as a string but lacks an enum to restrict
its values. Add an enum listing the allowed values: none, nano, micro, small,
medium, large, xlarge, and 2xlarge to ensure only these specific strings are
accepted and prevent invalid inputs that could break template rendering.

Comment on lines 33 to 37
"resourcesPreset": {
"type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
"default": "nano"
}

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.

🛠️ Refactor suggestion

Add an enum to enforce the allowed resourcesPreset values.

The docstring lists allowed presets, but the schema will happily accept
arbitrary strings. Tighten validation by introducing an enum field.

         "resourcesPreset": {
             "type": "string",
-            "description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
+            "description": "Use a common resources preset when `resources` is not set explicitly.",
+            "enum": [
+                "none",
+                "nano",
+                "micro",
+                "small",
+                "medium",
+                "large",
+                "xlarge",
+                "2xlarge"
+            ],
             "default": "nano"
         }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"resourcesPreset": {
"type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
"default": "nano"
}
"resourcesPreset": {
"type": "string",
"description": "Use a common resources preset when `resources` is not set explicitly.",
"enum": [
"none",
"nano",
"micro",
"small",
"medium",
"large",
"xlarge",
"2xlarge"
],
"default": "nano"
}
🤖 Prompt for AI Agents
In packages/apps/vpn/values.schema.json around lines 33 to 37, the
resourcesPreset property currently allows any string, but the description lists
specific allowed values. To fix this, add an enum field to the resourcesPreset
schema with the allowed values: none, nano, micro, small, medium, large, xlarge,
and 2xlarge. This will enforce validation to accept only these preset strings.

@kvaps
Andrei Kvapil (kvaps) merged commit 36b1034 into main Jun 24, 2025
@kvaps
Andrei Kvapil (kvaps) deleted the refactor-resources branch June 24, 2025 17:27
Nick Volynkin (NickVolynkin) added a commit to cozystack/website that referenced this pull request Jun 25, 2025
Mirroring cozystack/cozystack#1106

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
Nick Volynkin (NickVolynkin) added a commit to cozystack/website that referenced this pull request Jun 25, 2025
Mirroring changes from:
* cozystack/cozystack#1103
* cozystack/cozystack#1105
* cozystack/cozystack#1106

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
Nick Volynkin (NickVolynkin) added a commit to cozystack/website that referenced this pull request Jun 25, 2025
Mirroring changes from:
* cozystack/cozystack#1103
* cozystack/cozystack#1105
* cozystack/cozystack#1106

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
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