Skip to content

Conversation

@Kinue72
Copy link

@Kinue72 Kinue72 commented Sep 25, 2025

  • Added support for configuring the ClickHouse meter database via a new environment variable for external ClickHouse

contributes to - https://github.com/SigNoz/platform-pod/issues/1073

@Kinue72 Kinue72 requested a review from a team as a code owner September 25, 2025 04:29
@coderabbitai
Copy link

coderabbitai bot commented Sep 25, 2025

Walkthrough

Adds a new environment variable CLICKHOUSE_METER_DATABASE to the ClickHouse Helm template in both the enabled (in-cluster) and external env blocks, sourcing its value from externalClickhouse.meterDatabase with default "signoz_meter". No other control flow or variables were changed.

Changes

Cohort / File(s) Summary of Changes
ClickHouse env additions
charts/signoz/templates/_clickhouse.tpl
Inserted CLICKHOUSE_METER_DATABASE env var in both the enabled/in-cluster and external ClickHouse env blocks, set from .Values.externalClickhouse.meterDatabase with default "signoz_meter", placed after CLICKHOUSE_LOG_DATABASE and before CLICKHOUSE_USER; no other logic modified.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as Helm User
  participant Helm as Helm Template Engine
  participant Chart as charts/signoz/templates/_clickhouse.tpl
  participant Pod as ClickHouse Pod
  participant CH as ClickHouse Container

  User->>Helm: helm install/upgrade with values
  Helm->>Chart: Render _clickhouse.tpl (enabled & external paths)
  Chart-->>Helm: Env blocks include CLICKHOUSE_METER_DATABASE ("signoz_meter" default)
  Helm-->>Pod: Apply rendered manifest
  Pod->>CH: Container starts with env vars (incl. CLICKHOUSE_METER_DATABASE)
  Note right of CH: ClickHouse reads meter DB from CLICKHOUSE_METER_DATABASE
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review charts/signoz/templates/_clickhouse.tpl to confirm placement and templating expression correctness.
  • Check values schema/tests if present to ensure externalClickhouse.meterDatabase default is documented/validated.

Possibly related PRs

Suggested reviewers

  • grandwizard28

Poem

I twitched my whiskers, hopped with glee,
A meter var now greets both in-cluster and free.
After logs and before the user's name,
A tidy key to whisper the meter's aim.
Helm wraps the change — a rabbit's quiet cheer. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: adding a missing environment variable CLICKHOUSE_METER_DATABASE for external ClickHouse configuration.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e50b42e and ec4c640.

📒 Files selected for processing (1)
  • charts/signoz/templates/_clickhouse.tpl (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/signoz/templates/_clickhouse.tpl

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.

@Nageshbansal Nageshbansal changed the title fix: missing env CLICKHOUSE_METER_DATABASE fix: missing env CLICKHOUSE_METER_DATABASE for extenalClickhouse Sep 25, 2025
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