docs (k8s): Add Prometheus ServiceMonitor section for Console on K8s#1628
docs (k8s): Add Prometheus ServiceMonitor section for Console on K8s#1628david-yu wants to merge 1 commit intoredpanda-data:mainfrom
Conversation
Document the new monitoring.enabled, monitoring.scrapeInterval, and monitoring.labels Helm values that deploy a ServiceMonitor resource alongside Console for automatic Prometheus discovery. Relates to redpanda-data/redpanda-operator#1056 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for redpanda-docs-preview ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughDocumentation was added to the Kubernetes deployment guide specifying how to configure Prometheus Operator Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
modules/deploy/pages/console/kubernetes/deploy.adoc (1)
430-437: Clarify subchart configuration for all monitoring keysThis example only shows
console.monitoring.enabled, which can read as ifscrapeIntervalandlabelsare unavailable for subchart usage. Please include a full nested example to avoid misconfiguration.✏️ Suggested doc tweak
console: monitoring: enabled: true + scrapeInterval: "30s" + labels: + release: kube-prometheus-stack🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@modules/deploy/pages/console/kubernetes/deploy.adoc` around lines 430 - 437, The snippet only shows console.monitoring.enabled and may imply other keys aren't available; update the documentation example for the `console` subchart to show the full nested monitoring block including `enabled`, `scrapeInterval`, and `labels` (and any other monitoring-related keys used by Console), e.g., expand the YAML under `console.monitoring` to include `scrapeInterval: "30s"` and a `labels:` map with typical prometheus labels so readers can copy a complete subchart configuration; edit the example around the `console` key and ensure you reference `console.monitoring.enabled`, `console.monitoring.scrapeInterval`, and `console.monitoring.labels` to make all supported options explicit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@modules/deploy/pages/console/kubernetes/deploy.adoc`:
- Line 439: The doc line incorrectly claims the ServiceMonitor includes TLS
certificate and key file paths; update the sentence about ServiceMonitor/TLS to
say that when config.server.tls.enabled: true and monitoring is enabled, the
ServiceMonitor uses HTTPS and its tlsConfig only contains server-validation
fields (insecureSkipVerify, caFile, ca, serverName) for CA/server validation—not
client certificate/key paths—so remove any mention of client cert/key and
explicitly call out that this is server-side validation only.
---
Nitpick comments:
In `@modules/deploy/pages/console/kubernetes/deploy.adoc`:
- Around line 430-437: The snippet only shows console.monitoring.enabled and may
imply other keys aren't available; update the documentation example for the
`console` subchart to show the full nested monitoring block including `enabled`,
`scrapeInterval`, and `labels` (and any other monitoring-related keys used by
Console), e.g., expand the YAML under `console.monitoring` to include
`scrapeInterval: "30s"` and a `labels:` map with typical prometheus labels so
readers can copy a complete subchart configuration; edit the example around the
`console` key and ensure you reference `console.monitoring.enabled`,
`console.monitoring.scrapeInterval`, and `console.monitoring.labels` to make all
supported options explicit.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0f18d634-a4bc-42a9-99dc-e883f336510b
📒 Files selected for processing (1)
modules/deploy/pages/console/kubernetes/deploy.adoc
| enabled: true | ||
| ---- | ||
|
|
||
| When the Console server is configured with TLS (`config.server.tls.enabled: true`), the ServiceMonitor automatically uses HTTPS and includes the TLS certificate and key file paths for scraping. |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In the redpanda-data/redpanda-operator Console chart (including PR #1280), when config.server.tls.enabled=trueandmonitoring.enabled=true, what exact ServiceMonitor.spec.endpoints[].tlsConfigfields are rendered? Does it includecertFileandkeyFile, or only HTTPS scheme / CA-related fields?
💡 Result:
In the redpanda-data/redpanda-operator Console chart (charts/console), when config.server.tls.enabled=true and monitoring.enabled=true, the ServiceMonitor.spec.endpoints[].tlsConfig includes only HTTPS scheme and CA-related fields (insecureSkipVerify, caFile, ca, serverName), not certFile and keyFile (client certificate authentication fields). PR #1280 likely added or enhanced this TLS support for the Console ServiceMonitor, similar to PR #750 in the main redpanda chart which explicitly added tlsConfig with scheme: https when TLS is enabled, enableHttp2, and CA config.
Citations:
- 1: https://docs.redpanda.com/current/reference/k-console-helm-spec/
- 2: [redpanda] Add tlsConfig for ServiceMonitor helm-charts#750
- 3: https://github.com/redpanda-data/redpanda-operator
- 4: https://pkg.go.dev/github.com/redpanda-data/redpanda-operator/charts/redpanda/v5
Correct the TLS scrape configuration description
The statement is inaccurate. When config.server.tls.enabled: true and monitoring is enabled, the ServiceMonitor's tlsConfig includes only HTTPS scheme and CA-related fields (insecureSkipVerify, caFile, ca, serverName)—not client certificate and key file paths. Update the documentation to reflect that TLS configuration covers server-side validation, not client certificate authentication.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@modules/deploy/pages/console/kubernetes/deploy.adoc` at line 439, The doc
line incorrectly claims the ServiceMonitor includes TLS certificate and key file
paths; update the sentence about ServiceMonitor/TLS to say that when
config.server.tls.enabled: true and monitoring is enabled, the ServiceMonitor
uses HTTPS and its tlsConfig only contains server-validation fields
(insecureSkipVerify, caFile, ca, serverName) for CA/server validation—not client
certificate/key paths—so remove any mention of client cert/key and explicitly
call out that this is server-side validation only.
Summary
monitoring.enabled,monitoring.scrapeInterval, andmonitoring.labelsHelm values introduced in Add ServiceMonitor for admin metrics in console chart redpanda-operator#1280Relates to redpanda-data/redpanda-operator#1056
Test plan
🤖 Generated with Claude Code