Skip to content

prometheus: Add Argo CD Application metric charts - #1228

Open
Joshna907 wants to merge 3 commits into
headlamp-k8s:mainfrom
Joshna907:codex/prometheus-argocd-application-charts
Open

prometheus: Add Argo CD Application metric charts#1228
Joshna907 wants to merge 3 commits into
headlamp-k8s:mainfrom
Joshna907:codex/prometheus-argocd-application-charts

Conversation

@Joshna907

Copy link
Copy Markdown
Contributor

Summary

Adds Prometheus charts to Argo CD Application details.

This PR follows the Volcano metrics UI pattern: chart selection, time range, resolution, pause/resume, and the normal no-data and error states.

Charts

  • Sync activity
  • Average sync duration
  • Orphaned resources

Metrics are queried using the Application CR namespace and name. Prometheus remains optional: if it is disabled or Argo CD does not expose these metrics, the normal no-data state is shown.

Safety and scope

  • Uses only the selected cluster's existing Prometheus connection.
  • Adds no Argo CD API token, network configuration, or mutation action.
  • Does not claim that an available metric proves Application health or traffic correctness.

Validation

  • TypeScript passed.
  • ESLint passed with zero warnings.
  • Tests passed.
  • Production build passed.

Dependency

Depends on #1227. Once it merges, this branch will be rebased so this PR contains only the chart changes.

@Joshna907
Joshna907 marked this pull request as ready for review August 25, 2026 09:24
@illume
illume requested a balanced review from Copilot August 25, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds optional Prometheus charts to Argo CD Application details.

Changes:

  • Adds sync activity, sync duration, and orphaned-resource charts.
  • Restricts support to argoproj.io/v1alpha1 Applications.
  • Adds query escaping tests and documentation.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
prometheus/src/util.ts Enables eligible Argo CD Applications.
prometheus/src/util.test.ts Tests Application eligibility.
prometheus/src/index.tsx Integrates charts into Application details.
prometheus/src/components/Chart/ArgoCDApplicationChart/ArgoCDApplicationChart.tsx Defines charts and PromQL queries.
prometheus/src/components/Chart/ArgoCDApplicationChart/ArgoCDApplicationChart.test.ts Tests chart configuration and escaping.
prometheus/README.md Documents optional Application charts.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread prometheus/src/components/Chart/ArgoCDApplicationChart/ArgoCDApplicationChart.tsx Outdated
@Joshna907
Joshna907 force-pushed the codex/prometheus-argocd-application-charts branch from d489de7 to 40a79d0 Compare August 25, 2026 11:08

@illume illume left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Has some git conflicts now, can you please take a look?

Signed-off-by: Joshna907 <joshnawaikar@gmail.com>
Signed-off-by: Joshna907 <joshnawaikar@gmail.com>
Signed-off-by: Joshna907 <joshnawaikar@gmail.com>
@Joshna907
Joshna907 force-pushed the codex/prometheus-argocd-application-charts branch from 40a79d0 to 78f7e04 Compare August 27, 2026 11:48
@Joshna907

Copy link
Copy Markdown
Contributor Author

Has some git conflicts now, can you please take a look?

@illume ptal now

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.

3 participants