Skip to content

Conversation

NickVolynkin
Copy link
Collaborator

@NickVolynkin NickVolynkin commented Jul 14, 2025

Preset 'none' is in fact disallowed since #1156

Signed-off-by: Nick Volynkin nick.volynkin@gmail.com

Summary by CodeRabbit

  • Documentation
    • Updated documentation across all supported applications to remove "none" from the list of allowed values for the resourcesPreset parameter. Only sizing presets from "nano" to "2xlarge" are now listed as valid options.
  • Chores
    • Incremented chart versions for all affected applications.
    • Updated version mapping to reference specific commits for released versions.
    • Removed "none" from allowed enum values for resourcesPreset in JSON schemas across all applications.
    • Refactored Makefiles to centralize and update resource preset enums, removing "none" from allowed values.

Copy link
Contributor

coderabbitai bot commented Jul 14, 2025

## Walkthrough

This change removes the value "none" from the documented allowed values for the `resourcesPreset` parameter across multiple app Helm charts, README files, values.yaml, and schema descriptions. The enum lists in the schemas now consistently exclude "none." Chart versions and the versions_map file are also updated to reflect new patch versions and fixed commit hashes.

## Changes

| Files/Groups                             | Change Summary                                                                                      |
|----------------------------------------|---------------------------------------------------------------------------------------------------|
| `*/Chart.yaml`                         | Incremented chart versions for multiple applications.                                             |
| `*/README.md`, `*/values.yaml`         | Removed "none" from allowed values for `resourcesPreset` in documentation and comments for all apps.  |
| `*/values.schema.json`                 | Updated `resourcesPreset` property descriptions and enum arrays to remove "none" from allowed values. |
| `*/Makefile`                          | Updated `generate` targets to remove "none" from `resourcesPreset.enum` arrays in JSON schemas by using a centralized variable.   |
| `packages/apps/versions_map`           | Updated HEAD entries to specific commit hashes and added new HEAD entries for each app version.   |

## Possibly related PRs

- [cozystack/cozystack#1156](https://github.com/cozystack/cozystack/pull/1156): Refactors Helm templates to always apply resource presets, removing conditional logic for "none"—directly related to this PR’s removal of "none" as a documented option.
- [cozystack/cozystack#1117](https://github.com/cozystack/cozystack/pull/1117): Adds explicit enum constraints including "none" to `resourcesPreset` in JSON schemas; this PR updates descriptions for the same property.
- [cozystack/cozystack#695](https://github.com/cozystack/cozystack/pull/695): Initially introduced the `resourcesPreset` parameter for ClickHouse; this PR refines the allowed values in its documentation.

## Suggested labels

`backport`, `enhancement`

## Suggested reviewers

- lllamnyp
- klinch0
- kvaps

## Poem

> A hop and a skip, a preset's been trimmed,  
> "None" is now gone, our docs freshly primmed.  
> From nano to 2xlarge the choices remain,  
> Clearer for users, less room for pain.  
> 🐇✨ Chart versions leap,  
> Resource docs neat—  
> This bunny’s work is complete!

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🔭 Outside diff range comments (10)
packages/apps/tcp-balancer/values.yaml (1)

53-55: Remove "none" from the resourcesPreset enum in values.schema.json

The schema still allows "none", but the docs and comments list only: nano, micro, small, medium, large, xlarge, 2xlarge. Please update the enum to match:

• File: packages/apps/tcp-balancer/values.schema.json
– Locate the resourcesPreset block (around line 70)
– Remove the "none", entry from the "enum" array
– Don’t forget to bump any x-kubernetes-int-or-string hash if applicable

Suggested diff:

--- a/packages/apps/tcp-balancer/values.schema.json
+++ b/packages/apps/tcp-balancer/values.schema.json
@@ -70,7 +70,6 @@
       "enum": [
-        "none",
         "nano",
         "micro",
         "small",
packages/apps/postgres/values.schema.json (1)

125-138: Enum still allows none, contradicting updated description & PR goal

The description on line 127 states that the only allowed presets are nano … 2xlarge, yet the enum list (lines 129-137) still contains "none".
This directly contradicts the PR objective (“remove preset 'none'”) and will let validation pass while the docs say it’s forbidden.

Recommended fix (remove the entry and keep JSON valid):

@@
-            "enum": [
-                "none",
-                "nano",
+            "enum": [
+                "nano",
                 "micro",
                 "small",
                 "medium",
                 "large",
                 "xlarge",
                 "2xlarge"
             ]
packages/apps/clickhouse/values.schema.json (1)

85-98: Same description/enum mismatch as in Postgres

Line 87 no longer lists none, but the enum (lines 90-97) still does.
Keep schema and docs consistent by deleting "none" from the enum.

(See diff pattern shown in the Postgres comment.)

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

66-79: none preset still present in enum

Description on line 68 forbids none; enum lines 71-78 still permit it.
Remove "none" from the enum to align with chart/README changes.

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

75-83: MySQL schema also misses the final step

The description (line 77) drops none, but enum (lines 80-87) hasn’t.
Delete "none" from the enum to avoid confusing users and tooling.

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

55-61: Enum still allows none, description says it doesn’t – pick one and stay consistent

"none" was scrubbed from the human-readable description (l. 57) yet remains in the enum list (l. 60). Tooling that autogenerates forms/UIs from the schema will still expose none while readers of the docs will think it’s forbidden. Either:

-                "none",

or put none back into the description.
Failing to align the two will create subtle user errors and support noise.

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

35-41: Schema inconsistency: none hidden from description, still allowed

Same mismatch as in NATS: enum includes none (l. 40) though the description (l. 37) no longer lists it. Decide whether none is truly deprecated; then update both description and enum accordingly.

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

35-46: Align enum with description in packages/apps/vpn/values.schema.json
The schema’s description lists allowed presets as nano, micro, small, medium, large, xlarge, 2xlarge but the "enum" still includes "none", leading to silent validation of a value the docs forbid. Please reconcile this divergence:

Options:

  • Remove "none" from the enum:
     "enum": [
    -   "none",
        "nano",
        "micro",
        "small",
        "medium",
        "large",
        "xlarge",
        "2xlarge"
     ]
  • Or retain "none" but mark it as deprecated and update the description accordingly (e.g. using x-kubernetes-deprecated or a custom deprecation flag):
    "enum": [
      "none",            // deprecated
      "nano",
      // ...
    ],
    "description": "Default sizing preset used when `resources` is omitted. Allowed values: none (deprecated), nano, micro, small, medium, large, xlarge, 2xlarge."

Affected location:

  • packages/apps/vpn/values.schema.json (lines 35–46)
packages/apps/ferretdb/values.schema.json (1)

90-97: Enum still allows none, contradicting the new description

The description explicitly states the allowed presets no longer include none, yet the enum still lists it. This inconsistency means Helm will still accept none, defeating the purpose of the PR and potentially breaking templates that no longer support it.

-            "enum": [
-                "none",
-                "nano",
+            "enum": [
+                "nano",
                 "micro",

Either drop none from the enum (preferred) or keep it in the description with a clear deprecation note.

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

26-33: Same mismatch between description and enum for every control-plane component

All four resourcesPreset blocks removed none from the description but left it in enum. Users can still set none, producing an undefined state.

Please align enum and description across:
controlPlane.apiServer.resourcesPreset
controllerManager.resourcesPreset
scheduler.resourcesPreset
konnectivity.server.resourcesPreset

Consider extracting the preset enum into a shared $defs node to avoid this copy-paste drift.

Also applies to: 51-58, 76-83, 104-111

♻️ Duplicate comments (8)
packages/apps/http-cache/Chart.yaml (1)

19-19: Same comment as ClickHouse – enum vs. docs drift
Chart patch bump (0.6.1) is fine. Ensure the associated values.schema.json no longer advertises "none" so that docs, schema, and UX stay consistent.

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

19-19: Version bump acknowledged – keep enum list aligned
0.8.1 patch version is correct. As with other charts in this PR, check that "none" is eliminated from the schema enum to avoid contradicting the updated README.

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

19-19: Patch bump is fine – don’t forget schema cleanup
version is now 0.7.1. Please ensure values.schema.json also drops "none" or flags it deprecated so users aren’t offered a choice that docs forbid.

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

38-39: Same enum/documentation mismatch as noted for RabbitMQ

The preset list in the comment no longer mentions none, but packages/apps/vpn/values.schema.json still validates it. Please align.

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

54-55: Enum still accepts none – update or deprecate

Replicate the fix suggested in RabbitMQ’s README so users don’t get conflicting signals.

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

21-22: Enum/documentation inconsistency

Same concern: values.schema.json still lists "none". Please reconcile.

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

39-40: Remove none from schema or mark it deprecated

Mirrors the issue already described; see RabbitMQ comment for details.

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

35-41: Remove or document none uniformly

none survives in the enum (l. 40) but vanished from the description (l. 37). This breaks the contract between documentation and validation logic exactly like the other schemas in this PR.

Apply the same fix repo-wide to prevent mixed messages.

🧹 Nitpick comments (11)
packages/apps/clickhouse/Chart.yaml (1)

19-19: Patch-level bump looks good – please also reconcile the schema enum
version was correctly incremented to 0.11.1, matching a documentation-only change.
However, the chart’s values.schema.json still lists "none" in the resourcesPreset enum while the docs now omit it. That mismatch may confuse users (UI pickers, validation tooling, etc.). Consider dropping "none" from the enum or adding a deprecation notice to keep behaviour and docs in sync.

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

19-19: Patch bump OK, but control-plane presets suffer from the same enum/descriptive divergence
version: 0.25.3 is a proper patch increment. Verify that the control-plane component schemas remove "none" from resourcesPreset enum or explicitly mark it deprecated; otherwise users can still select an option the README tells them is disallowed.

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

64-65: Same doc/schema divergence as other charts
none removed from comment but still accepted by schema. Unify documentation and validation to avoid silent acceptance of an “unsupported” value.

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

71-72: Maintain consistency between docs and schema
As with HTTP-cache and MySQL, the preset list in comments no longer matches the enum in values.schema.json. Recommend updating the schema or reinstating none in docs.

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

24-25: README/table out-of-sync with schema

The table now omits none, yet schema still allows it. Either document that none is deprecated or purge it from validation to avoid confusion.

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

70-74: Keep docs, schema & defaulting behaviour in sync

Docs remove none, but values.schema.json for haproxy/nginx still advertises it. Either:

  1. delete "none" from enum arrays, or
  2. explain in docs why the value is technically allowed yet unsupported (e.g., retained for backward-compat but will warn).
    Current state is confusing.
packages/apps/vpn/README.md (1)

34-36: Minor: fix schema divergence

Same observation – README no longer shows none, schema still does. Align them to avoid user confusion.

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

56-57: Schema / comment mismatch mirrors VPN issue

Same inconsistency: chart comments disallow none, yet the JSON-schema (and probably template) still accept it. Consider aligning both sources of truth to prevent user confusion.

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

34-46: HAProxy resourcesPreset enum still lists none

Description was updated, but the enum retains none. See earlier comment in VPN schema—same fix applies.


63-76: Nginx resourcesPreset enum still lists none

Ditto for the nginx block. Keep description and enum consistent.

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

96-97: Comment / validation gap

Comment removes none, but schema still permits it (Postgres values.schema.json unchanged). Align documentation and validation to avoid support issues.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c1a4a58 and 4f70cea.

📒 Files selected for processing (49)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/README.md (1 hunks)
  • packages/apps/clickhouse/values.schema.json (1 hunks)
  • 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 (2 hunks)
  • packages/apps/kafka/Chart.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 (2 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 (10 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)
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/ferretdb/README.md:35-37
Timestamp: 2025-07-02T09:58:11.406Z
Learning: In the cozystack repository, the maintainer NickVolynkin prefers to keep realistic-looking example credentials in README documentation rather than using generic placeholders like <ACCESS_KEY>, even though they are just examples and not real secrets.
packages/apps/clickhouse/README.md (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/clickhouse/README.md:60-67
Timestamp: 2025-07-03T05:54:51.264Z
Learning: The `cozy-lib.resources.sanitize` function in packages/library/cozy-lib/templates/_resources.tpl supports both standard Kubernetes resource format (with limits:/requests: sections) and flat format (direct resource specifications). The flat format takes priority over nested values. CozyStack apps include cozy-lib as a chart dependency through symlinks in packages/apps/*/charts/cozy-lib directories.
packages/apps/nats/README.md (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/clickhouse/README.md:60-67
Timestamp: 2025-07-03T05:54:51.264Z
Learning: The `cozy-lib.resources.sanitize` function in packages/library/cozy-lib/templates/_resources.tpl supports both standard Kubernetes resource format (with limits:/requests: sections) and flat format (direct resource specifications). The flat format takes priority over nested values. CozyStack apps include cozy-lib as a chart dependency through symlinks in packages/apps/*/charts/cozy-lib directories.
packages/apps/rabbitmq/README.md (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/clickhouse/README.md:60-67
Timestamp: 2025-07-03T05:54:51.264Z
Learning: The `cozy-lib.resources.sanitize` function in packages/library/cozy-lib/templates/_resources.tpl supports both standard Kubernetes resource format (with limits:/requests: sections) and flat format (direct resource specifications). The flat format takes priority over nested values. CozyStack apps include cozy-lib as a chart dependency through symlinks in packages/apps/*/charts/cozy-lib directories.
packages/apps/kubernetes/README.md (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/clickhouse/README.md:60-67
Timestamp: 2025-07-03T05:54:51.264Z
Learning: The `cozy-lib.resources.sanitize` function in packages/library/cozy-lib/templates/_resources.tpl supports both standard Kubernetes resource format (with limits:/requests: sections) and flat format (direct resource specifications). The flat format takes priority over nested values. CozyStack apps include cozy-lib as a chart dependency through symlinks in packages/apps/*/charts/cozy-lib directories.
packages/apps/kubernetes/values.yaml (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/clickhouse/README.md:60-67
Timestamp: 2025-07-03T05:54:51.264Z
Learning: The `cozy-lib.resources.sanitize` function in packages/library/cozy-lib/templates/_resources.tpl supports both standard Kubernetes resource format (with limits:/requests: sections) and flat format (direct resource specifications). The flat format takes priority over nested values. CozyStack apps include cozy-lib as a chart dependency through symlinks in packages/apps/*/charts/cozy-lib directories.
packages/apps/kubernetes/values.schema.json (1)
Learnt from: lllamnyp
PR: cozystack/cozystack#1130
File: hack/e2e-apps/kubernetes.bats:101-101
Timestamp: 2025-07-11T06:11:25.417Z
Learning: In cozystack, the plural form for the Kubernetes custom resource is `kuberneteses.apps.cozystack.io`, not `kubernetes.apps.cozystack.io`. This is defined in the API schema even though it's not grammatically perfect.
packages/apps/ferretdb/README.md (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/clickhouse/README.md:60-67
Timestamp: 2025-07-03T05:54:51.264Z
Learning: The `cozy-lib.resources.sanitize` function in packages/library/cozy-lib/templates/_resources.tpl supports both standard Kubernetes resource format (with limits:/requests: sections) and flat format (direct resource specifications). The flat format takes priority over nested values. CozyStack apps include cozy-lib as a chart dependency through symlinks in packages/apps/*/charts/cozy-lib directories.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (12)
packages/apps/rabbitmq/Chart.yaml (1)

19-19: Chart version bump LGTM

The new sem-ver patch (0.8.1) correctly reflects a documentation-only change.
No other issues spotted. Remember to regenerate dist/ artifacts (if any) before releasing.

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

19-19: Consistent patch version increment

0.8.1 keeps all charts in sync – good housekeeping. Nothing else to flag here.

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

19-19: Patch bump acknowledged

The patch bump (0.8.1) is appropriate for docs/schema text updates.
No functional changes detected.

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

19-19: Patch bump looks correct

0.5.1 aligns with the minor doc clean-up. Good to merge.

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

19-19: Version bump OK

Patch release (0.9.1) is appropriate. Ensure the central versions_map stays in sync.

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

19-19: Chart version bump looks good – remember to keep ancillary references in sync
The semantic-version increment to 0.9.1 is appropriate. Please ensure accompanying artefacts (README badge, versions_map, release notes) were updated in the same commit to avoid drift.

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

19-19: Postgres chart version updated correctly – double-check dependent docs
0.17.2 correctly reflects a patch-level change. As with Redis, verify that every location referencing the chart version (CHANGELOG, version map, README badge) now points to 0.17.2.

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

21-22: Keep docs & validation in sync

none dropped from comment but still present in values.schema.json. Users will see conflicting guidance.

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

49-50: RabbitMQ values comment vs. schema mismatch

As with other charts, please remove none from the enum or deprecate it so docs and validation tell the same story.

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

118-124: Docs updated, but schemas still accept none across apps

The table now correctly omits none, yet related JSON schemas (including the four flagged above) still list it.
Before merging, verify every affected schema removes none; otherwise users will pass “forbidden” values without warning.

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

123-132: Comments diverge from schema & other apps

All four control-plane components have had none dropped from the “Allowed values” comment, but the shared schema (cozy-lib preset enum) still exposes none. Consumers reading the values file will assume none is invalid, while Helm validation will continue to accept it.

Please either:

  1. purge none from the central enum, or
  2. restore it in the comments here.

Keeping comments and validation rules in lock-step avoids frustrating chart users.

Also applies to: 134-139, 140-145, 146-151

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

106-107: Docs update LGTM

The new table entry correctly reflects the supported preset list and default. No further action required.

Comment on lines +22 to 23
## @param kafka.resourcesPreset Default sizing preset used when `resources` is omitted. Allowed values: nano, micro, small, medium, large, xlarge, 2xlarge.
resourcesPreset: "small"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Schema still allows none → risk of silent mis-configuration

Docs now forbid resourcesPreset: none, but the accompanying values.schema.json for Kafka still lists "none" in the enum.
This mismatch means Helm/CI validation will still happily accept the old value while the README/values.yaml comment says it is disallowed.

Please either

  1. drop "none" from the enum list, or
  2. keep it in the enum but mark it "deprecated": true + explain the deprecation in the description.
-          "enum": ["none", "nano", "micro", … ]
+          "enum": ["nano", "micro", … ]
+          // "none" removed in #1156

At the very least, bump the schema’s description to match the new contract.

Also applies to: 34-35


🏁 Script executed:

#!/bin/bash
# Locate any enums that still expose "none"
rg -n '"enum": \[.*none' packages/apps | head

Length of output: 47


🏁 Script executed:

#!/bin/bash
# Locate the Kafka values schema file
schema_file=$(find . -type f -name values.schema.json | grep -i 'packages/apps/kafka/values.schema.json' || true)
echo "Schema file: $schema_file"

if [ -n "$schema_file" ]; then
  echo -e "\nSearching for 'none' in enum definitions:"
  rg -n '"enum":\s*\[.*none' "$schema_file" || echo "  → No 'none' entries found in enums."

  echo -e "\nSearching for the resourcesPreset schema block:"
  rg -n 'resourcesPreset' -A5 "$schema_file" || echo "  → 'resourcesPreset' block not found."
else
  echo "Error: Kafka values.schema.json not found under packages/apps/kafka."
fi

Length of output: 1947


Remove deprecated none preset from Kafka schema enums

The resourcesPreset enums in packages/apps/kafka/values.schema.json for both Kafka and Zookeeper replicas still include "none", which contradicts the docs and values.yaml comment. Please remove "none" (or mark it as deprecated) and update the schema description accordingly.

Affected locations:

  • packages/apps/kafka/values.schema.json: Kafka resourcesPreset enum (around lines 37–44)
  • packages/apps/kafka/values.schema.json: Zookeeper resourcesPreset enum (around lines 77–85)

Suggested diff for each block:

--- a/packages/apps/kafka/values.schema.json
@@ -37,7 +37,7 @@
     "enum": [
-      "none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"
+      "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"
     ]
+    // "none" removed in #1156

Also bump the description field to reflect that none is no longer supported.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In packages/apps/kafka/values.schema.json around lines 37 to 44 and 77 to 85,
the `resourcesPreset` enum for Kafka and Zookeeper replicas still includes the
deprecated value "none". Remove "none" from both enums and update the
corresponding description fields to indicate that "none" is no longer supported.
This will align the schema with the documentation and values.yaml comments.

@@ -27,7 +27,7 @@ The service utilizes official RabbitMQ operator. This ensures the reliability an
| `users` | Users configuration | `{}` |
| `vhosts` | Virtual Hosts configuration | `{}` |
| `resources` | Explicit CPU and memory configuration for each RabbitMQ replica. When left empty, the preset defined in `resourcesPreset` is applied. | `{}` |
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge. | `nano` |
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: nano, micro, small, medium, large, xlarge, 2xlarge. | `nano` |
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Schema & docs diverge – remove none from the enum as well

The documentation now disallows the preset none, but the corresponding packages/apps/rabbitmq/values.schema.json enum still contains it (per PR summary). This lets users pick a value that is explicitly documented as forbidden, leading to silent configuration drift.

Either:

  1. Drop "none" from the enum array, or
  2. Keep it but mark it deprecated: true (if your JSON-schema tooling supports that).

Run once to see where it still sneaks in:


🏁 Script executed:

#!/usr/bin/env bash
# Find all schema files that still allow the 'none' preset
rg --no-heading -n '"none"' --glob '*values.schema.json'

Length of output: 1389


Remove none from schema enums to match documentation

The README preset list no longer includes none, but it still appears in the JSON schemas across multiple packages, causing silent configuration drift. Please drop "none" from the enum arrays (or mark it as deprecated if your tooling supports that) in the following files:

  • packages/system/metallb/charts/metallb/values.schema.json
  • packages/apps/nats/values.schema.json
  • packages/apps/mysql/values.schema.json
  • packages/apps/vpn/values.schema.json
  • packages/apps/http-cache/values.schema.json
  • packages/apps/ferretdb/values.schema.json
  • packages/apps/tcp-balancer/values.schema.json
  • packages/apps/redis/values.schema.json
  • packages/apps/rabbitmq/values.schema.json
  • packages/apps/postgres/values.schema.json
  • packages/apps/kubernetes/values.schema.json
  • packages/apps/clickhouse/values.schema.json
  • packages/apps/kafka/values.schema.json
🤖 Prompt for AI Agents
In packages/apps/rabbitmq/values.schema.json and the other listed JSON schema
files, the enum arrays still include the value "none" which is no longer present
in the README documentation. To fix this, remove the "none" entry from all enum
arrays defining resource presets in these schema files to ensure consistency and
prevent configuration drift. If your tooling supports deprecation, alternatively
mark "none" as deprecated instead of removing it outright.

Comment on lines 97 to 99
| `resources` | Explicit CPU and memory configuration for each MariaDB replica. When left empty, the preset defined in `resourcesPreset` is applied. | `{}` |
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge. | `nano` |
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: nano, micro, small, medium, large, xlarge, 2xlarge. | `nano` |

Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Same mismatch: schema still allows "none"

Nice doc update, but packages/apps/mysql/values.schema.json#/properties/resourcesPreset/enum still contains "none". Helm-template will happily accept none, contradicting the README. Align the schema or keep the value documented.


🏁 Script executed:

#!/bin/bash
# Check the enum values for resourcesPreset in the MySQL chart schema
rg -n '"resourcesPreset"' -A5 -B5 packages/apps/mysql/values.schema.json

Length of output: 650


Mismatch Between README and Schema for resourcesPreset

The values.schema.json for the MySQL chart still allows "none" as a valid resourcesPreset, but the README no longer documents it. Please align the schema with the documentation (or vice versa).

• File: packages/apps/mysql/values.schema.json
Location: around line 79
Current enum:

"enum": [
  "none",
  "nano",
  "micro",
  "small",
  "medium",
  "large",
  "xlarge",
  "2xlarge"
]

• Action: Remove "none" from the enum (or include it in the README’s allowed values) to eliminate this discrepancy.

🤖 Prompt for AI Agents
In packages/apps/mysql/values.schema.json around line 79, the enum for
resourcesPreset includes "none" which is not documented in the README at
packages/apps/mysql/README.md lines 97-99. To fix this mismatch, remove "none"
from the enum array in values.schema.json so it matches the documented allowed
values, or alternatively add "none" to the README's list of allowed values to
keep them consistent.

Comment on lines 16 to 20
| `kafka.resources` | Explicit CPU and memory configuration for each Kafka replica. When left empty, the preset defined in `resourcesPreset` is applied. | `{}` |
| `kafka.resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge. | `small` |
| `kafka.resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: nano, micro, small, medium, large, xlarge, 2xlarge. | `small` |
| `zookeeper.resources` | Explicit CPU and memory configuration for each Zookeeper replica. When left empty, the preset defined in `resourcesPreset` is applied. | `{}` |
| `zookeeper.resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge. | `small` |
| `zookeeper.resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: nano, micro, small, medium, large, xlarge, 2xlarge. | `small` |

Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Update the JSON schema for both kafka & zookeeper presets

none was dropped from the table, yet both kafka.values.schema.json and zookeeper.resourcesPreset enum arrays continue to list it. Users following autocomplete/IDE hints will pick the disallowed value.
Action: strip "none" from the enums and increment the chart apiVersion/version accordingly.


🏁 Script executed:

#!/bin/bash
set -e

echo "Listing all .schema.json files:"
fd .schema.json || true

echo -e "\nSearching for 'resourcesPreset' in schema files:"
rg -n '"resourcesPreset"' -g '*.schema.json' || true

Length of output: 4343


Remove deprecated “none” from Kafka & Zookeeper resourcesPreset enums

The resourcesPreset enums in packages/apps/kafka/values.schema.json still include "none", even though the README table no longer lists it. IDE autocomplete will surface an unsupported value.

• In packages/apps/kafka/values.schema.json:

  • Under the top-level kafka.resourcesPreset block (around line 33), remove "none" from the "enum" array.
  • Under the nested zookeeper.resourcesPreset block (around line 73), also remove "none" from the "enum" array.

• In packages/apps/kafka/Chart.yaml:

  • Increment the chart version (and appVersion if used) to signal this breaking schema change.

Action: strip "none" from both enum arrays and bump the chart version accordingly.

🤖 Prompt for AI Agents
In packages/apps/kafka/values.schema.json around lines 33 and 73, remove the
deprecated "none" value from the "enum" arrays for both kafka.resourcesPreset
and zookeeper.resourcesPreset to align with the README and prevent unsupported
values. Then, in packages/apps/kafka/Chart.yaml, increment the chart version
(and appVersion if present) to indicate this breaking schema change.

Comment on lines 30 to 32
| `resources` | Explicit CPU and memory configuration for each TCP Balancer replica. When left empty, the preset defined in `resourcesPreset` is applied. | `{}` |
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge. | `nano` |
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: nano, micro, small, medium, large, xlarge, 2xlarge. | `nano` |

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

README out of sync with chart validation

none was removed from the table but the chart schema still accepts it. Readers of the README will mis-configure values when following examples copied from older repos or scripts.

Synchronise documentation with the authoritative schema to avoid user confusion.

🤖 Prompt for AI Agents
In packages/apps/tcp-balancer/README.md around lines 30 to 32, the README
documentation lists allowed values for `resourcesPreset` but does not include
`none`, which the chart schema still accepts. Update the README to include
`none` as an allowed value if the schema supports it, or remove `none` from the
schema validation if it is no longer valid, ensuring both are synchronized to
prevent user misconfiguration.

Comment on lines +17 to +18
clickhouse 0.11.0 08cb7c0f
clickhouse 0.11.1 HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Version map update looks fine but please verify commit hash 08cb7c0f exists

All bumped chart versions point to the same commit. Double-check that commit contains the corresponding chart changes for every app to avoid future bisect headaches.

If the hash is a merge commit, consider tagging annotated releases per chart for better traceability.

Also applies to: 31-32, 41-42, 58-59, 63-64, 78-79, 91-92, 115-116, 129-130, 142-143, 150-151, 201-202


🏁 Script executed:

git cat-file -p 08cb7c0f | head

Length of output: 524


Merge commit 08cb7c0 verified; tag annotated chart releases for better traceability

  • The commit hash 08cb7c0 exists and is a merge commit (two parents), so it should include all chart changes.
  • Double-check that this merge indeed contains the bumped chart definitions for each app.
  • For future bisecting and clearer history, tag an annotated release for each chart version (e.g., clickhouse-v0.11.0, clickhouse-v0.11.1, etc.) rather than relying solely on merge SHAs.

Applies to lines 17-18, 31-32, 41-42, 58-59, 63-64, 78-79, 91-92, 115-116, 129-130, 142-143, 150-151, 201-202.

🤖 Prompt for AI Agents
In packages/apps/versions_map around lines 17-18 and the other specified line
ranges, ensure that the merge commit 08cb7c0f includes all the bumped chart
definitions for each app by verifying the changes in the merge. Then, create
annotated git tags for each chart version mentioned (e.g., clickhouse-v0.11.0,
clickhouse-v0.11.1) to improve traceability and facilitate future bisecting,
instead of relying only on merge commit SHAs.

@NickVolynkin NickVolynkin force-pushed the disallow-preset-none branch 2 times, most recently from f4f9958 to 3d7958c Compare July 14, 2025 06:47
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
packages/apps/rabbitmq/Makefile (1)

3-5: Duplication of preset lists across app Makefiles

Every app Makefile now hard-codes the same enum array. When this list changes again it will require N manual edits. Consider moving the preset list to a shared template or a small script (e.g., scripts/update-resources-preset.sh) that all packages invoke, keeping a single source of truth.

packages/apps/vpn/Makefile (1)

5-5: Avoid repeating hard-coded preset lists across app Makefiles

The same literal array ["nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"] now appears in many app Makefiles. Any future change (e.g., adding 4xlarge) would have to be edited N times, increasing maintenance overhead and risk of inconsistency.

Consider extracting the list into a shared variable in scripts/package.mk (or a small helper file) and referencing it here, e.g.:

PRESET_ENUM := ["nano","micro","small","medium","large","xlarge","2xlarge"]

generate:
	readme-generator -v values.yaml -s values.schema.json -r README.md
	yq -i -o json --indent 4 '.properties.resourcesPreset.enum = $(PRESET_ENUM)' values.schema.json

That keeps all charts in sync with one edit.

packages/apps/tcp-balancer/Makefile (1)

6-6: Consider DRY-ing up the preset list

The exact same hard-coded enum array appears in several app Makefiles. When the list changes, each copy must be touched, which is error-prone. Moving this list to a single central variable (e.g. an environment var in scripts/package.mk or a YAML fragment that all Makefiles yq-merge) would eliminate duplication and guarantee consistency across charts.

packages/apps/http-cache/Makefile (1)

26-27: Duplicate enum assignment – consider DRY-ing this

The same literal list is written twice. A small helper (e.g. a Makefile variable or a shared yq expression that updates both paths in one call) would remove duplication and lower maintenance cost when the preset list changes again.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f4f9958 and 3d7958c.

📒 Files selected for processing (60)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/Makefile (1 hunks)
  • packages/apps/clickhouse/README.md (1 hunks)
  • packages/apps/clickhouse/values.schema.json (1 hunks)
  • packages/apps/clickhouse/values.yaml (1 hunks)
  • packages/apps/ferretdb/Chart.yaml (1 hunks)
  • packages/apps/ferretdb/Makefile (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/Makefile (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 (2 hunks)
  • packages/apps/kafka/Chart.yaml (1 hunks)
  • packages/apps/kafka/Makefile (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 (2 hunks)
  • packages/apps/mysql/Chart.yaml (1 hunks)
  • packages/apps/mysql/Makefile (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/Makefile (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/Makefile (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/Makefile (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/Makefile (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/Makefile (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 (10 hunks)
  • packages/apps/vpn/Chart.yaml (1 hunks)
  • packages/apps/vpn/Makefile (1 hunks)
  • packages/apps/vpn/README.md (1 hunks)
  • packages/apps/vpn/values.schema.json (1 hunks)
  • packages/apps/vpn/values.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (13)
  • packages/apps/postgres/Makefile
  • packages/apps/clickhouse/Makefile
  • packages/apps/mysql/Makefile
  • packages/apps/kafka/values.yaml
  • packages/apps/nats/values.yaml
  • packages/apps/redis/Makefile
  • packages/apps/kafka/Makefile
  • packages/apps/clickhouse/README.md
  • packages/apps/tcp-balancer/README.md
  • packages/apps/clickhouse/values.yaml
  • packages/apps/ferretdb/Makefile
  • packages/apps/nats/Makefile
  • packages/apps/vpn/README.md
🚧 Files skipped from review as they are similar to previous changes (43)
  • packages/apps/ferretdb/Chart.yaml
  • packages/apps/rabbitmq/Chart.yaml
  • packages/apps/kubernetes/Chart.yaml
  • packages/apps/http-cache/Chart.yaml
  • packages/apps/mysql/values.yaml
  • packages/apps/mysql/Chart.yaml
  • packages/apps/vpn/Chart.yaml
  • packages/apps/redis/values.yaml
  • packages/apps/tcp-balancer/Chart.yaml
  • packages/apps/vpn/values.yaml
  • packages/apps/mysql/values.schema.json
  • packages/apps/clickhouse/Chart.yaml
  • packages/apps/ferretdb/values.yaml
  • packages/apps/kafka/Chart.yaml
  • packages/apps/http-cache/values.yaml
  • packages/apps/rabbitmq/README.md
  • packages/apps/mysql/README.md
  • packages/apps/redis/Chart.yaml
  • packages/apps/tcp-balancer/values.yaml
  • packages/apps/nats/Chart.yaml
  • packages/apps/kubernetes/values.yaml
  • packages/apps/ferretdb/README.md
  • packages/apps/clickhouse/values.schema.json
  • packages/apps/http-cache/README.md
  • packages/apps/redis/README.md
  • packages/apps/kafka/README.md
  • packages/apps/ferretdb/values.schema.json
  • packages/apps/tcp-balancer/values.schema.json
  • packages/apps/vpn/values.schema.json
  • packages/apps/redis/values.schema.json
  • packages/apps/nats/values.schema.json
  • packages/apps/rabbitmq/values.yaml
  • packages/apps/rabbitmq/values.schema.json
  • packages/apps/http-cache/values.schema.json
  • packages/apps/postgres/values.yaml
  • packages/apps/nats/README.md
  • packages/apps/postgres/README.md
  • packages/apps/kubernetes/README.md
  • packages/apps/kubernetes/values.schema.json
  • packages/apps/kafka/values.schema.json
  • packages/apps/postgres/Chart.yaml
  • packages/apps/postgres/values.schema.json
  • packages/apps/versions_map
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/ferretdb/README.md:35-37
Timestamp: 2025-07-02T09:58:11.406Z
Learning: In the cozystack repository, the maintainer NickVolynkin prefers to keep realistic-looking example credentials in README documentation rather than using generic placeholders like <ACCESS_KEY>, even though they are just examples and not real secrets.
packages/apps/rabbitmq/Makefile (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1117
File: packages/apps/mysql/Makefile:8-8
Timestamp: 2025-06-26T04:29:24.830Z
Learning: The cozystack project uses yq v4+ on their CI runner, so yq v4 syntax (-o json --indent 4) is compatible and version checks are not needed.
packages/apps/vpn/Makefile (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1117
File: packages/apps/mysql/Makefile:8-8
Timestamp: 2025-06-26T04:29:24.830Z
Learning: The cozystack project uses yq v4+ on their CI runner, so yq v4 syntax (-o json --indent 4) is compatible and version checks are not needed.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: pre-commit
🔇 Additional comments (2)
packages/apps/rabbitmq/Makefile (1)

5-5: Ensure default no longer refers to "none"

The enum update looks correct, but please double-check that values.yaml and any defaulting logic don’t still set resourcesPreset: none; otherwise installs will fail schema validation.

packages/apps/tcp-balancer/Makefile (1)

7-7: Ensure the cleanup matches the yq backup suffix

yq -i from Mike Farah v4 creates a backup file ending in .bak unless the YQ_BACKUP_SUFFIX env var is set.
The script removes values.schema.json.tmp, which will be a no-op if the suffix is still the default .bak.
Please double-check the yq version / env var used in CI and adjust the suffix (or remove the cleanup step) to avoid leaving stray backup files.

@NickVolynkin NickVolynkin force-pushed the disallow-preset-none branch from 3d7958c to 6312c9c Compare July 14, 2025 07:32
Preset 'none' is in fact disallowed since #1156

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
@NickVolynkin NickVolynkin force-pushed the disallow-preset-none branch from 6312c9c to 55cfdb3 Compare July 14, 2025 16:31
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/apps/kubernetes/Makefile (2)

3-3: Quote the JSON literal to make future edits safe

PRESET_ENUM currently contains no spaces, so un-quoted expansion works.
As soon as a maintainer decides to add a space after any comma for readability the Make parser will split the list into multiple words and the yq command will break. Wrapping the value in single quotes once avoids that latent foot-gun without changing behaviour.

-PRESET_ENUM := ["nano","micro","small","medium","large","xlarge","2xlarge"]
+PRESET_ENUM := '["nano","micro","small","medium","large","xlarge","2xlarge"]'

11-14: DRY up the four almost-identical yq invocations

The four commands only differ in the component path, which leads to the generate target exceeding the repo’s maxbodylength guideline and makes future maintenance error-prone.

A compact loop keeps the intent clear, shortens the recipe, and satisfies the linter:

-	yq -o json -i '.properties.controlPlane.properties.apiServer.properties.resourcesPreset.enum = $(PRESET_ENUM)' values.schema.json
-	yq -o json -i '.properties.controlPlane.properties.controllerManager.properties.resourcesPreset.enum = $(PRESET_ENUM)' values.schema.json
-	yq -o json -i '.properties.controlPlane.properties.scheduler.properties.resourcesPreset.enum = $(PRESET_ENUM)' values.schema.json
-	yq -o json -i '.properties.controlPlane.properties.konnectivity.properties.server.properties.resourcesPreset.enum = $(PRESET_ENUM)' values.schema.json
+	for c in apiServer controllerManager scheduler; do \
+		yq -o json -i ".properties.controlPlane.properties.$$c.properties.resourcesPreset.enum = $(PRESET_ENUM)" values.schema.json ; \
+	done
+	yq -o json -i '.properties.controlPlane.properties.konnectivity.properties.server.properties.resourcesPreset.enum = $(PRESET_ENUM)' values.schema.json

This drops three near-duplicate lines while keeping the Konnectivity path explicit.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6312c9c and 55cfdb3.

📒 Files selected for processing (61)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/Makefile (1 hunks)
  • packages/apps/clickhouse/README.md (1 hunks)
  • packages/apps/clickhouse/values.schema.json (1 hunks)
  • packages/apps/clickhouse/values.yaml (1 hunks)
  • packages/apps/ferretdb/Chart.yaml (1 hunks)
  • packages/apps/ferretdb/Makefile (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/Makefile (2 hunks)
  • packages/apps/http-cache/README.md (1 hunks)
  • packages/apps/http-cache/values.schema.json (2 hunks)
  • packages/apps/http-cache/values.yaml (2 hunks)
  • packages/apps/kafka/Chart.yaml (1 hunks)
  • packages/apps/kafka/Makefile (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/Makefile (1 hunks)
  • packages/apps/kubernetes/README.md (1 hunks)
  • packages/apps/kubernetes/values.schema.json (4 hunks)
  • packages/apps/kubernetes/values.yaml (2 hunks)
  • packages/apps/mysql/Chart.yaml (1 hunks)
  • packages/apps/mysql/Makefile (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/Makefile (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/Makefile (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/Makefile (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/Makefile (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/Makefile (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 (10 hunks)
  • packages/apps/vpn/Chart.yaml (1 hunks)
  • packages/apps/vpn/Makefile (1 hunks)
  • packages/apps/vpn/README.md (1 hunks)
  • packages/apps/vpn/values.schema.json (1 hunks)
  • packages/apps/vpn/values.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (9)
  • packages/apps/http-cache/values.yaml
  • packages/apps/tcp-balancer/values.yaml
  • packages/apps/clickhouse/README.md
  • packages/apps/clickhouse/values.yaml
  • packages/apps/kafka/values.yaml
  • packages/apps/http-cache/README.md
  • packages/apps/redis/Makefile
  • packages/apps/kubernetes/README.md
  • packages/apps/http-cache/values.schema.json
🚧 Files skipped from review as they are similar to previous changes (51)
  • packages/apps/clickhouse/Chart.yaml
  • packages/apps/mysql/Chart.yaml
  • packages/apps/tcp-balancer/Chart.yaml
  • packages/apps/kafka/Chart.yaml
  • packages/apps/ferretdb/Chart.yaml
  • packages/apps/vpn/Chart.yaml
  • packages/apps/kubernetes/Chart.yaml
  • packages/apps/rabbitmq/Chart.yaml
  • packages/apps/nats/Chart.yaml
  • packages/apps/postgres/Chart.yaml
  • packages/apps/ferretdb/Makefile
  • packages/apps/http-cache/Chart.yaml
  • packages/apps/vpn/Makefile
  • packages/apps/redis/Chart.yaml
  • packages/apps/nats/README.md
  • packages/apps/ferretdb/values.yaml
  • packages/apps/nats/values.yaml
  • packages/apps/mysql/values.yaml
  • packages/apps/mysql/values.schema.json
  • packages/apps/redis/values.yaml
  • packages/apps/postgres/values.yaml
  • packages/apps/mysql/README.md
  • packages/apps/redis/README.md
  • packages/apps/tcp-balancer/README.md
  • packages/apps/vpn/values.yaml
  • packages/apps/tcp-balancer/values.schema.json
  • packages/apps/vpn/README.md
  • packages/apps/clickhouse/Makefile
  • packages/apps/nats/Makefile
  • packages/apps/rabbitmq/README.md
  • packages/apps/kafka/Makefile
  • packages/apps/http-cache/Makefile
  • packages/apps/ferretdb/README.md
  • packages/apps/rabbitmq/Makefile
  • packages/apps/rabbitmq/values.schema.json
  • packages/apps/vpn/values.schema.json
  • packages/apps/redis/values.schema.json
  • packages/apps/postgres/Makefile
  • packages/apps/kafka/README.md
  • packages/apps/postgres/values.schema.json
  • packages/apps/kubernetes/values.schema.json
  • packages/apps/nats/values.schema.json
  • packages/apps/postgres/README.md
  • packages/apps/kubernetes/values.yaml
  • packages/apps/mysql/Makefile
  • packages/apps/tcp-balancer/Makefile
  • packages/apps/ferretdb/values.schema.json
  • packages/apps/kafka/values.schema.json
  • packages/apps/versions_map
  • packages/apps/rabbitmq/values.yaml
  • packages/apps/clickhouse/values.schema.json
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: NickVolynkin
PR: cozystack/cozystack#1120
File: packages/apps/ferretdb/README.md:35-37
Timestamp: 2025-07-02T09:58:11.406Z
Learning: In the cozystack repository, the maintainer NickVolynkin prefers to keep realistic-looking example credentials in README documentation rather than using generic placeholders like <ACCESS_KEY>, even though they are just examples and not real secrets.
packages/apps/kubernetes/Makefile (1)
Learnt from: NickVolynkin
PR: cozystack/cozystack#1196
File: packages/apps/http-cache/Makefile:24-27
Timestamp: 2025-07-14T16:23:12.758Z
Learning: In the cozystack repository, the `readme-generator` tool removes enum contents from values.schema.json files during its operation. Therefore, when using readme-generator in Makefiles, any enum values need to be injected back into the schema using yq commands after readme-generator has run, not before.
🪛 checkmake (0.2.2)
packages/apps/kubernetes/Makefile

[warning] 8-8: Target body for "generate" exceeds allowed length of 5 (6).

(maxbodylength)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build

Copy link
Member

@lllamnyp lllamnyp left a comment

Choose a reason for hiding this comment

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

LGTM

@NickVolynkin NickVolynkin merged commit c58aa79 into main Jul 15, 2025
30 of 33 checks passed
@NickVolynkin NickVolynkin deleted the disallow-preset-none branch July 15, 2025 06:06
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.

2 participants