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 commented Aug 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added optional Grafana dashboard provisioning through Helm.
    • Added ServiceMonitor options for label honoring, metric relabeling, and namespace selection.
    • Added monitoring configuration for dashboards, pod monitoring, tracing, and service monitoring.
  • Changes

    • Moved ServiceMonitor and tracing settings under monitoring.
    • Tracing now samples all traces by default.
  • Documentation

    • Updated monitoring, deployment, logging, and tracing configuration guidance.
  • Chores

    • Updated the Helm chart to version 1.2.0.

Walkthrough

The Helm chart moves ServiceMonitor and tracing settings under monitoring. It adds Grafana dashboard provisioning and podMonitoring schema configuration. ServiceMonitor rendering now supports namespace selection, label honoring, and metric relabeling. Tracing defaults to parentbased_always_on with an empty sampler argument. Documentation and Helm test values use the new paths. The chart version changes to 1.2.0.

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

Sequence Diagram(s)

sequenceDiagram
  participant Helm
  participant Kubernetes
  participant Grafana
  participant PrometheusOperator
  Helm->>Kubernetes: Render dashboard ConfigMap and ServiceMonitor from monitoring values
  Kubernetes->>Grafana: Expose labeled dashboard ConfigMap
  Kubernetes->>PrometheusOperator: Expose ServiceMonitor endpoint configuration
Loading

Suggested reviewers: tirthct, rh-amarin

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately identifies the Grafana dashboard provisioning change in the pull request.
Description check ✅ Passed The description directly covers the monitoring configuration, dashboard, tracing, ServiceMonitor, documentation, and test changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 HEAD^..HEAD changes no Go files; production log scans found no sensitive token/password/credential/secret fields, and configuration output uses redactIfSet with request headers masked.
No Hardcoded Secrets ✅ Passed The PR diff adds no API keys, tokens, passwords, private keys, credential-bearing URLs, or base64 secrets; the new ConfigMap only embeds the existing dashboard JSON.
No Weak Cryptography ✅ Passed PR modifies only YAML configuration, JSON schema, documentation, and shell test files. No source code files (.go, .py, .js, .ts, .c, .cpp) are modified. No cryptographic primitives or implementatio...
No Injection Vectors ✅ Passed The PR adds only Helm templates, values, docs, and test configuration; added lines contain no SQL construction, exec.Command, template.HTML, or yaml.Unmarshal, and the dashboard path is static.
No Privileged Containers ✅ Passed No CWE-250 violation found: templates have no privileged, hostPID, hostNetwork, hostIPC, or SYS_ADMIN settings; defaults use non-root UID 65532 and disable escalation. Dockerfile USER root is justi...
No Pii Or Sensitive Data In Logs ✅ Passed PR changes only Helm/YAML/Markdown/shell/JSON; no logging calls or sensitive log payloads were added. No CWE-532 exposure is present.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Warning

Review ran into problems

🔥 Problems

Repository analysis: Couldn't refresh openshift-hyperfleet/hyperfleet-api clone - clone failed: Clone operation failed: remote: Invalid username or token. Password authentication is not supported for Git operations.
fatal: Authentication failed for 'https://github.com/openshift-hyperfleet/hyperfleet-api.git/'


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/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 410 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 commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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 commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@Ruclo
Ruclo force-pushed the HYPERFLEET-1363 branch 3 times, most recently from 874ee73 to a8af034 Compare August 5, 2026 15:14
@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 commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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

Comment thread charts/templates/configmap-dashboard.yaml
…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 a8af034 to 1afdd5a Compare August 5, 2026 16:04
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown

@Ruclo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/helm-test 1afdd5a link true /test helm-test

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@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

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