Skip to content

feat: make ServiceMonitor API group configurable#2574

Open
amarkdotdev wants to merge 1 commit into
NVIDIA:mainfrom
amarkdotdev:feat/servicemonitor-api-group
Open

feat: make ServiceMonitor API group configurable#2574
amarkdotdev wants to merge 1 commit into
NVIDIA:mainfrom
amarkdotdev:feat/servicemonitor-api-group

Conversation

@amarkdotdev

@amarkdotdev amarkdotdev commented Jun 23, 2026

Copy link
Copy Markdown

Summary

Fixes #2397.

Azure Managed Prometheus on AKS registers ServiceMonitor under azmonitoring.coreos.com instead of monitoring.coreos.com. This change adds an optional apiGroup field to ServiceMonitorConfig (defaulting to monitoring.coreos.com) and uses it when looking up the ServiceMonitor CRD and creating/updating ServiceMonitor objects.

Changes

  • Add apiGroup to ServiceMonitorConfig with GetAPIGroup() helper and documented defaults
  • Resolve the ServiceMonitor CRD name and GVK from the configured API group at reconcile time
  • Extend operator RBAC (Helm chart and config/rbac/role.yaml) for azmonitoring.coreos.com/servicemonitors
  • Document the AKS setting in values.yaml

Testing

  • go test ./controllers/... -run TestServiceMonitor

@copy-pr-bot

copy-pr-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@amarkdotdev amarkdotdev force-pushed the feat/servicemonitor-api-group branch 2 times, most recently from faeeef5 to 86e20fc Compare June 23, 2026 19:21
Add apiGroup to ServiceMonitorConfig so clusters using Azure Managed
Prometheus on AKS can target azmonitoring.coreos.com. Defaults to
monitoring.coreos.com and updates RBAC for the alternate API group.

Signed-off-by: amarkdotdev <amarkdotdev@users.noreply.github.com>
@amarkdotdev amarkdotdev force-pushed the feat/servicemonitor-api-group branch from 86e20fc to bd526cf Compare June 23, 2026 19:26
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.

Feature Request: Make ServiceMonitor API group configurable (support azmonitoring.coreos.com for AKS)

1 participant