Skip to content

HYPERFLEET-1363 - feat: add Grafana dashboard provisioning to Helm chart - #326

Open
Ruclo wants to merge 1 commit into
openshift-hyperfleet:mainfrom
Ruclo:HYPERFLEET-1363
Open

HYPERFLEET-1363 - feat: add Grafana dashboard provisioning to Helm chart#326
Ruclo wants to merge 1 commit into
openshift-hyperfleet:mainfrom
Ruclo:HYPERFLEET-1363

Conversation

@Ruclo

@Ruclo Ruclo commented Aug 5, 2026

Copy link
Copy Markdown

Why

Part of HYPERFLEET-1363 — unify observability values under monitoring: across all HyperFleet component charts and consolidate dashboard provisioning.

Note: This PR moves serviceMonitor and tracing under monitoring:. The infra repo (base-api.yaml.gotmpl) currently passes serviceMonitor.enabled at the top level — the corresponding infra PR must merge together with this one.

Changes

  • Move serviceMonitor and tracing under monitoring: section
  • Add monitoring.dashboard.enabled toggle for future Grafana sidecar provisioning
  • Add honorLabels, metricRelabeling, namespaceSelector to serviceMonitor
  • Default sampler to parentbased_always_on
  • Update values.schema.json to match new paths
  • Update docs (deployment.md, logging.md, config.md) and scripts/test-helm.sh

Test plan

  • make test-helm passes (21 tests)
  • Deploy with infra PR using OBSERVABILITY_ENABLED=true

@openshift-ci
openshift-ci Bot requested review from rh-amarin and tirthct August 5, 2026 11:04
@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jsell-rh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/values.schema.json`:
- Around line 891-915: Extend the serviceMonitor schema definition with entries
for honorLabels, metricRelabeling, and namespaceSelector, using boolean, array,
and object types respectively to match the values consumed by
servicemonitor.yaml. Keep the existing serviceMonitor properties unchanged and
align each new definition with the corresponding values.yaml/template input.

In `@docs/deployment.md`:
- Around line 448-454: Update the Helm examples in the deployment documentation
so each monitoring variant is a complete, copy-pastable shell command: repeat
the full helm install command for the custom Prometheus selector and alternate
namespace examples, or connect all --set options with valid shell continuations.

In `@docs/logging.md`:
- Line 59: Update the logging documentation’s sampler configuration to use
parentbased_traceidratio instead of parentbased_always_on wherever the default
sampler is described, and keep OTEL_TRACES_SAMPLER_ARG=0.1 as the 10%
root-sampling value. Reconcile the fallback/default argument text in the logging
guide so the examples and explanatory sections consistently describe the same
sampler behavior, including the sections referenced by the existing sampler
settings and fallback descriptions.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 17793209-8027-4e78-939f-01a497925735

📥 Commits

Reviewing files that changed from the base of the PR and between e8fb197 and 9116d53.

📒 Files selected for processing (9)
  • charts/README.md
  • charts/templates/deployment.yaml
  • charts/templates/servicemonitor.yaml
  • charts/values.schema.json
  • charts/values.yaml
  • docs/config.md
  • docs/deployment.md
  • docs/logging.md
  • scripts/test-helm.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)

Comment thread charts/values.schema.json
Comment thread docs/deployment.md
Comment thread docs/logging.md Outdated
@hyperfleet-ci-bot

hyperfleet-ci-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

Risk Score: 1 — risk/low

Signal Detail Points
PR size 412 lines (>200) +1
Sensitive paths none +0

Computed by hyperfleet-risk-scorer

@Ruclo
Ruclo force-pushed the HYPERFLEET-1363 branch from 9116d53 to 57ada42 Compare August 5, 2026 11:24

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/templates/servicemonitor.yaml`:
- Line 1: Update the ServiceMonitor example in docs/metrics.md to use the
chart’s actual values path, monitoring.serviceMonitor.enabled, instead of the
obsolete root-level serviceMonitor.enabled. Keep the example aligned with the
ServiceMonitor template symbol .Values.monitoring.serviceMonitor.enabled so
copied configuration will render the resource correctly.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 4e9a30f4-def7-4c2e-add1-2057c6d6e522

📥 Commits

Reviewing files that changed from the base of the PR and between e8fb197 and 57ada42.

📒 Files selected for processing (9)
  • charts/README.md
  • charts/templates/deployment.yaml
  • charts/templates/servicemonitor.yaml
  • charts/values.schema.json
  • charts/values.yaml
  • docs/config.md
  • docs/deployment.md
  • docs/logging.md
  • scripts/test-helm.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
🚧 Files skipped from review as they are similar to previous changes (8)
  • docs/config.md
  • scripts/test-helm.sh
  • docs/deployment.md
  • charts/README.md
  • docs/logging.md
  • charts/templates/deployment.yaml
  • charts/values.yaml
  • charts/values.schema.json

Comment thread charts/templates/servicemonitor.yaml
@Ruclo
Ruclo force-pushed the HYPERFLEET-1363 branch from 57ada42 to 69d7acf Compare August 5, 2026 11:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/logging.md`:
- Around line 392-402: Update the default-sampling statement in the telemetry
documentation to match the runtime fallback in parseSamplingRate and
pkg/telemetry/otel.go: describe ParentBased(TraceIDRatioBased(...)) and clarify
that the configured rate applies to root spans while parent sampling decisions
are respected. Remove the claim that all traces are sampled by default, and
retain parentbased_always_on only as an explicitly configured sampler option.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: f6b88f22-c5a7-4b92-863e-1d95fc23cc4b

📥 Commits

Reviewing files that changed from the base of the PR and between e8fb197 and 69d7acf.

📒 Files selected for processing (9)
  • charts/README.md
  • charts/templates/deployment.yaml
  • charts/templates/servicemonitor.yaml
  • charts/values.schema.json
  • charts/values.yaml
  • docs/config.md
  • docs/deployment.md
  • docs/logging.md
  • scripts/test-helm.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
🚧 Files skipped from review as they are similar to previous changes (6)
  • scripts/test-helm.sh
  • charts/templates/deployment.yaml
  • charts/README.md
  • docs/config.md
  • docs/deployment.md
  • charts/values.schema.json

Comment thread docs/logging.md
@Ruclo

Ruclo commented Aug 5, 2026

Copy link
Copy Markdown
Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/templates/configmap-dashboard.yaml`:
- Around line 1-12: Increment the chart version in Chart.yaml from 1.1.0 to the
next version, keeping the existing parent revision unchanged, then run make
test-helm with Helm installed to verify the chart.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c336e75d-3489-482a-8e24-9ddf16af41c5

📥 Commits

Reviewing files that changed from the base of the PR and between e8fb197 and a8af034.

📒 Files selected for processing (10)
  • charts/README.md
  • charts/templates/configmap-dashboard.yaml
  • charts/templates/deployment.yaml
  • charts/templates/servicemonitor.yaml
  • charts/values.schema.json
  • charts/values.yaml
  • docs/config.md
  • docs/deployment.md
  • docs/logging.md
  • scripts/test-helm.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
🚧 Files skipped from review as they are similar to previous changes (7)
  • docs/config.md
  • scripts/test-helm.sh
  • docs/logging.md
  • charts/values.schema.json
  • charts/values.yaml
  • docs/deployment.md
  • charts/templates/deployment.yaml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/Chart.yaml`:
- Line 5: Update the version advertised by the badge in charts/README.md from
1.1.0 to 1.2.0 so it matches the version declared in Chart.yaml.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 250b3fda-01c7-4b9d-8ec3-7a3f21c01090

📥 Commits

Reviewing files that changed from the base of the PR and between 822b124 and 1afdd5a.

📒 Files selected for processing (11)
  • charts/Chart.yaml
  • charts/README.md
  • charts/templates/configmap-dashboard.yaml
  • charts/templates/deployment.yaml
  • charts/templates/servicemonitor.yaml
  • charts/values.schema.json
  • charts/values.yaml
  • docs/config.md
  • docs/deployment.md
  • docs/logging.md
  • scripts/test-helm.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
🚧 Files skipped from review as they are similar to previous changes (8)
  • docs/config.md
  • scripts/test-helm.sh
  • docs/deployment.md
  • docs/logging.md
  • charts/templates/deployment.yaml
  • charts/README.md
  • charts/values.schema.json
  • charts/values.yaml

Comment thread charts/Chart.yaml
description: HyperFleet API - Cluster Lifecycle Management Service
type: application
version: 1.1.0
version: 1.2.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the chart version in charts/README.md.

charts/Chart.yaml now declares version: 1.2.0, but charts/README.md:1 still advertises Version: 1.1.0. Update the README badge in this change so release documentation matches the chart metadata.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/Chart.yaml` at line 5, Update the version advertised by the badge in
charts/README.md from 1.1.0 to 1.2.0 so it matches the version declared in
Chart.yaml.

Source: Path instructions

@openshift-hyperfleet openshift-hyperfleet deleted a comment from coderabbitai Bot Aug 6, 2026
@openshift-hyperfleet openshift-hyperfleet deleted a comment from coderabbitai Bot Aug 6, 2026
@openshift-hyperfleet openshift-hyperfleet deleted a comment from coderabbitai Bot Aug 6, 2026
@openshift-hyperfleet openshift-hyperfleet deleted a comment from coderabbitai Bot Aug 6, 2026
@openshift-hyperfleet openshift-hyperfleet deleted a comment from coderabbitai Bot Aug 6, 2026
@openshift-hyperfleet openshift-hyperfleet deleted a comment from coderabbitai Bot Aug 6, 2026
…ng section

Consolidate all observability configuration under a single monitoring:
section for consistency across HyperFleet charts.

- Move serviceMonitor and tracing from top-level to monitoring section
- Add honorLabels, metricRelabeling, namespaceSelector to serviceMonitor
- Add dashboard toggle for future Grafana sidecar provisioning
- Default sampler to parentbased_always_on
@Ruclo
Ruclo force-pushed the HYPERFLEET-1363 branch from 1afdd5a to b8cb5f4 Compare August 6, 2026 09:41
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added optional Grafana dashboard provisioning through Helm.
    • Expanded monitoring configuration with ServiceMonitor customization, namespace selection, label handling, metric relabeling, and PodMonitoring support.
    • ServiceMonitor resources now default to the release namespace when unspecified.
  • Enhancements

    • Updated tracing defaults to enable sampling by default.
    • Updated Helm chart version to 1.2.0.
  • Documentation

    • Updated configuration, deployment, logging, and chart documentation for the new monitoring and tracing settings.

Walkthrough

The Helm chart version changes to 1.2.0. Monitoring values now nest ServiceMonitor and tracing settings under monitoring. ServiceMonitor supports namespace selection, label honoring, and metric relabelings. Optional Grafana dashboard ConfigMap provisioning and PodMonitoring schema are added. Tracing defaults change to parentbased_always_on. Documentation and Helm tests use the updated configuration paths.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: rh-amarin, tirthct, rafabene

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding Grafana dashboard provisioning to the Helm chart.
Description check ✅ Passed The description directly explains the Helm chart configuration, observability changes, documentation updates, and test plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Sec-02: Secrets In Log Output ✅ Passed The PR diff contains no log statements. Non-test Go scans found no sensitive logging fields or fmt.Print* calls containing token, password, credential, or secret.
No Hardcoded Secrets ✅ Passed PASS: Added-line scans found no API keys, tokens, passwords, credential assignments, embedded URL credentials, or >32-character base64 strings; no CWE-798 finding.
No Weak Cryptography ✅ Passed PR changes Helm templates, values, and documentation only; no added banned primitives, custom crypto, or secret comparisons were found. Existing sha256sum use is unchanged.
No Injection Vectors ✅ Passed Changed files contain only Helm/docs/test updates; no SQL concatenation, exec.Command, template.HTML, or yaml.Unmarshal. The dashboard is static chart JSON embedded with .Files.Get.
No Privileged Containers ✅ Passed No privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation:true, or runAsUser:0 settings were added; Dockerfile USER root is documented for package installation and switches...
No Pii Or Sensitive Data In Logs ✅ Passed The PR changes only Helm, documentation, and test-script files; no logging statements or PII-bearing log arguments were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/templates/configmap-dashboard.yaml`:
- Around line 1-12: Update the NOTES.txt template to document the
monitoring.dashboard.enabled value and explain that Grafana dashboard
provisioning requires the grafana_dashboard: "1" sidecar label used by the
hyperfleet-api dashboard ConfigMap.

In `@charts/templates/servicemonitor.yaml`:
- Around line 31-32: Validate monitoring.serviceMonitor.interval and
scrapeTimeout in charts/values.schema.json for supported Prometheus duration
syntax, and enforce that scrapeTimeout is not greater than interval while
allowing equal values. Update charts/templates/servicemonitor.yaml to fail
rendering when either duration is invalid or the timeout exceeds the interval,
rather than emitting values the Prometheus Operator will reject.

In `@charts/values.yaml`:
- Around line 435-453: Prevent the unused root-level serviceMonitor
configuration in values.yaml from silently passing validation: either wire
serviceMonitor.* to the monitoring.serviceMonitor implementation as an explicit
compatibility alias, or reject it with a clear migration error directing users
to monitoring.serviceMonitor.*. Update docs/metrics.md and chart API consumers
to use the supported path.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 3df4aea8-c083-46ab-866c-39740442b53e

📥 Commits

Reviewing files that changed from the base of the PR and between cf39733 and b8cb5f4.

📒 Files selected for processing (11)
  • charts/Chart.yaml
  • charts/README.md
  • charts/templates/configmap-dashboard.yaml
  • charts/templates/deployment.yaml
  • charts/templates/servicemonitor.yaml
  • charts/values.schema.json
  • charts/values.yaml
  • docs/config.md
  • docs/deployment.md
  • docs/logging.md
  • scripts/test-helm.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)

Comment thread charts/templates/configmap-dashboard.yaml
Comment thread charts/templates/servicemonitor.yaml
Comment thread charts/values.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant