Skip to content

Conversation

@tamalsaha
Copy link
Contributor

No description provided.

kodiakhq[bot]
kodiakhq bot previously approved these changes Jan 29, 2026
kodiakhq[bot]
kodiakhq bot previously approved these changes Jan 29, 2026
Signed-off-by: Tamal Saha <tamal@appscode.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for relabel configurations to the ServiceMonitor API, enabling users to customize how Prometheus labels are processed during metric scraping.

Changes:

  • Added TargetLabels, PodTargetLabels, and Endpoints fields to ServiceMonitorSpec
  • Introduced new Endpoint type with RelabelConfigs and MetricRelabelConfigs fields
  • Updated the Prometheus Operator agent to apply user-specified relabel configurations while preserving default pod label mappings

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
api/v1/types.go Added Endpoint struct and extended ServiceMonitorSpec with target labels and endpoints fields to support relabel configurations
api/v1/zz_generated.deepcopy.go Added generated DeepCopy methods for the new Endpoint type and updated ServiceMonitorSpec DeepCopy to handle new slice fields
api/v1/openapi_generated.go Added OpenAPI schema definitions for Endpoint type and updated ServiceMonitorSpec schema with new fields
agents/prometheusoperator/lib.go Enhanced agent to populate ServiceMonitor with user-specified target labels and merge custom relabel configs with default pod label mappings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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