Skip to content

chore(k8s) add ServiceMonitor#199

Merged
dmitsh merged 1 commit into
mainfrom
ds-svcmon
Jan 22, 2026
Merged

chore(k8s) add ServiceMonitor#199
dmitsh merged 1 commit into
mainfrom
ds-svcmon

Conversation

@dmitsh
Copy link
Copy Markdown
Collaborator

@dmitsh dmitsh commented Jan 22, 2026

No description provided.

Signed-off-by: Dmitry Shmulevich <dshmulevich@nvidia.com>
@dmitsh dmitsh self-assigned this Jan 22, 2026
@dmitsh dmitsh requested a review from ravisoundar January 22, 2026 03:41
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jan 22, 2026

Greptile Summary

Adds Prometheus ServiceMonitor support to the Helm chart, enabling automated metrics collection by the Prometheus Operator. The implementation includes a new template file with proper conditional rendering and a configuration block in values.yaml with sensible defaults (disabled by default, 15s interval, /metrics endpoint).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes follow Helm best practices, use proper templating, and add an opt-in feature that's disabled by default. The ServiceMonitor correctly references the existing Service port and the application's /metrics endpoint.
  • No files require special attention

Important Files Changed

Filename Overview
charts/topograph/templates/servicemonitor.yaml Added ServiceMonitor resource for Prometheus metrics collection with proper conditional rendering and selector configuration
charts/topograph/values.yaml Added serviceMonitor configuration block with sensible defaults for Prometheus metrics scraping

Sequence Diagram

sequenceDiagram
    participant User as User/Admin
    participant Helm as Helm Chart
    participant K8s as Kubernetes API
    participant SM as ServiceMonitor
    participant Prometheus as Prometheus Operator
    participant Svc as Topograph Service
    participant App as Topograph App

    User->>Helm: helm install/upgrade with serviceMonitor.enabled=true
    Helm->>K8s: Create ServiceMonitor resource
    K8s->>SM: ServiceMonitor created in monitoring namespace
    Prometheus->>SM: Watch for ServiceMonitor resources
    SM-->>Prometheus: ServiceMonitor configuration
    Prometheus->>Svc: Discover Service via selector labels
    Prometheus->>App: Scrape /metrics on http port every 15s
    App-->>Prometheus: Return Prometheus metrics
    Note over Prometheus: Metrics stored and available for querying
Loading

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.71%. Comparing base (8449f26) to head (e8e6c3c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #199   +/-   ##
=======================================
  Coverage   65.71%   65.71%           
=======================================
  Files          78       78           
  Lines        4290     4290           
=======================================
  Hits         2819     2819           
  Misses       1362     1362           
  Partials      109      109           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@ravisoundar ravisoundar left a comment

Choose a reason for hiding this comment

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

lgtm

@dmitsh dmitsh merged commit 7c9b841 into main Jan 22, 2026
7 checks passed
@dmitsh dmitsh deleted the ds-svcmon branch January 22, 2026 21:29
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.

2 participants