Skip to content

Conversation

@nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented Oct 27, 2025

Many self-hosters ran into issues with the defaults and prod resource examples. This should help, but at the same time it's important to keep an eye on resource usage of self-hosted deployments for reliable operation.

@changeset-bot
Copy link

changeset-bot bot commented Oct 27, 2025

⚠️ No Changeset found

Latest commit: 76772b9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Walkthrough

This pull request updates a Kubernetes Helm chart configuration across multiple files. The Chart.yaml version is bumped to 4.0.5 while the appVersion remains unchanged. Documentation and configuration examples for ClickHouse resource allocations are increased with explanatory comments about resource consumption and OOM risk. The values.yaml file undergoes structural refactoring, converting multi-line empty specifications to inline scalar forms and introducing a new resourcesPreset: "xlarge" configuration option for ClickHouse, replacing manual resource specifications.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Chart.yaml version bump: Straightforward metadata update
  • Documentation consistency: README and values-production-example changes align resource examples with documentation best practices
  • values.yaml structural refactoring: While touching multiple entries, the changes follow a consistent pattern of inline scalar conversion and the introduction of resourcesPreset as a new configuration knob

Areas requiring attention:

  • Verify that resourcesPreset: "xlarge" is properly supported by the Helm chart templating logic
  • Confirm that the increased resource examples (4000m CPU, 16Gi memory) are appropriate for typical production deployments
  • Ensure the inline scalar conversions in values.yaml maintain semantic equivalence with previous configurations

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description is largely incomplete when compared against the template requirements. The template specifies required sections including a "Closes #" statement, a checklist with contributor acknowledgment, a Testing section, a Changelog section, and optional Screenshots. The provided description contains only a brief two-sentence explanation of the problem and reasoning, without any of these structured template elements or mandatory sections. The author should update the pull request description to follow the repository template. At minimum, include the issue reference (Closes #), complete the contributor checklist, describe the testing performed, add a changelog entry describing the changes, and ensure all required sections are filled out appropriately before merging.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "chore(helm): increase default clickhouse resources" is directly and accurately related to the main changes in the changeset. The modifications across Chart.yaml, README.md, values-production-example.yaml, and values.yaml all center on increasing ClickHouse resource defaults (cpu and memory limits/requests) along with supporting documentation and configuration updates. The title is concise, specific, and clearly communicates the primary change without unnecessary noise.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/ch-default-limits

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@matt-aitken matt-aitken merged commit 8fdbbeb into main Oct 27, 2025
30 of 31 checks passed
@matt-aitken matt-aitken deleted the chore/ch-default-limits branch October 27, 2025 13:45
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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 255ea0a and 76772b9.

📒 Files selected for processing (4)
  • hosting/k8s/helm/Chart.yaml (1 hunks)
  • hosting/k8s/helm/README.md (1 hunks)
  • hosting/k8s/helm/values-production-example.yaml (1 hunks)
  • hosting/k8s/helm/values.yaml (11 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-06-25T13:18:44.103Z
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2195
File: hosting/k8s/helm/Chart.yaml:1-18
Timestamp: 2025-06-25T13:18:44.103Z
Learning: For the Trigger.dev Helm chart, the chart name should be "trigger" (not "trigger-v4") since this is the first official chart release. Helper templates should use the actual chart name from .Chart.Name rather than hardcoded prefixes.

Applied to files:

  • hosting/k8s/helm/Chart.yaml
📚 Learning: 2025-06-25T13:20:17.174Z
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2195
File: hosting/k8s/helm/values.yaml:22-51
Timestamp: 2025-06-25T13:20:17.174Z
Learning: In the Trigger.dev Helm chart values.yaml, the maintainer prefers to use explicit comprehensive warnings for security-sensitive default values rather than implementing secure-by-default behavior that would fail installation. The project uses deterministic default secrets with clear "TESTING ONLY" warnings and instructions for production deployment.

Applied to files:

  • hosting/k8s/helm/Chart.yaml
📚 Learning: 2025-06-25T13:18:04.827Z
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2195
File: hosting/k8s/helm/templates/extra-manifests.yaml:1-4
Timestamp: 2025-06-25T13:18:04.827Z
Learning: In the Trigger.dev v4 Helm chart, the user prefers to rely on documentation and examples in values files rather than implementing defensive coding in templates, particularly for features like extraManifests where proper usage is documented.

Applied to files:

  • hosting/k8s/helm/Chart.yaml
⏰ 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). (23)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
hosting/k8s/helm/Chart.yaml (1)

5-5: Appropriate version bump.

Patch version increment from 4.0.4 to 4.0.5 is correct for configuration and documentation updates.

hosting/k8s/helm/values.yaml (2)

113-113: Consistent inline formatting for empty structures.

The shift to inline representations of empty arrays ([]) and dicts ({}) is a stylistic improvement that doesn't alter YAML semantics. Applied consistently across webapp, supervisor, electric, registry, and root-level configuration.

Also applies to: 127-127, 141-141, 158-158, 247-247, 320-320, 517-517, 738-738, 764-764, 786-786


550-555: Based on my verification of the Bitnami ClickHouse chart documentation, here is the rewritten review comment:


Confirm "xlarge" resourcesPreset is appropriate and understand production implications.

"xlarge" is a valid preset value for the Bitnami ClickHouse chart, and real-world deployments use this preset with ClickHouse 9.3.x versions. However, be aware that in production workloads using resourcesPreset is discouraged as it may not fully adapt to your specific needs. With resources: {} left empty, the preset will be applied. For production use, consider defining explicit resource requests and limits under the resources field instead of relying on the preset.

hosting/k8s/helm/README.md (1)

659-668: Clear and well-placed resource guidance.

Documentation in the Production Readiness Checklist effectively communicates ClickHouse resource requirements with clear explanations of OOM risks. The example values (4000m/16Gi limits, 2000m/8Gi requests) provide concrete guidance and align with the production example configuration.

hosting/k8s/helm/values-production-example.yaml (1)

85-89: Memory allocation discrepancy found—verify against Bitnami chart repository.

The web search indicates the "xlarge" preset allocates 4Gi memory, but the production example specifies 16Gi limits—a 4× difference. The CPU value (4000m) aligns correctly.

Before proceeding, verify the actual xlarge preset values in the Bitnami ClickHouse chart v9.3.7 repository or consult your local values.yaml to confirm whether:

  • The production example intentionally exceeds the preset
  • The preset definition has changed
  • The values require alignment

Comment on lines +81 to +82
# ClickHouse can be very resource intensive, so we recommend setting limits and requests accordingly
# Note: not doing this can cause OOM crashes which will cause issues across many different
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Complete the truncated comment.

Line 82's comment appears to end mid-sentence: "...which will cause issues across many different" lacks a conclusion. Finish the thought to clarify the scope of OOM impact (e.g., "...across many different components" or "...across many different services").

🤖 Prompt for AI Agents
In hosting/k8s/helm/values-production-example.yaml around lines 81 to 82, the
comment is truncated and ends with "which will cause issues across many
different"; complete the sentence to clarify the impact of OOM crashes — for
example, change it to "which will cause OOM crashes which will cause issues
across many different components and services in the cluster." Update the
comment text in place to finish the thought and make the scope explicit.

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.

3 participants