feat: support metric relabelings for dcgm exporter - #2939
efegokdemir wants to merge 1 commit into
Conversation
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to Add rendered-manifest coverage for configured metric relabelings before merging so Helm users are protected from regressions in the new configuration path. Comment |
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (1)
controllers/object_controls_test.go-2011-2015 (1)
2011-2015: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winAdd render coverage for
metricRelabelings.
TestDCGMExporterServiceMonitorRenderedenables aServiceMonitorbut sets onlyIntervaland checks only its name. Set a non-emptyMetricRelabelingsvalue and assert the renderedspec.endpoints[0].metricRelabelingsfield.Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: NVIDIA/gpu-operator/.coderabbit.yaml
Review profile: QUIET
Plan: Enterprise
Run ID: 66496226-62be-4384-856f-d12a2dcacf64
⛔ Files ignored due to path filters (7)
api/nvidia/v1/zz_generated.deepcopy.gois excluded by!**/zz_generated.*.gobundle/manifests/nvidia.com_clusterpolicies.yamlis excluded by!bundle/manifests/nvidia.com_*.yamlbundle/manifests/nvidia.com_gpuclusters.yamlis excluded by!bundle/manifests/nvidia.com_*.yamlconfig/crd/bases/nvidia.com_clusterpolicies.yamlis excluded by!config/crd/bases/**config/crd/bases/nvidia.com_gpuclusters.yamlis excluded by!config/crd/bases/**deployments/gpu-operator/crds/nvidia.com_clusterpolicies.yamlis excluded by!deployments/gpu-operator/crds/**deployments/gpu-operator/crds/nvidia.com_gpuclusters.yamlis excluded by!deployments/gpu-operator/crds/**
📒 Files selected for processing (5)
api/nvidia/v1/clusterpolicy_types.gocontrollers/object_controls.gocontrollers/object_controls_test.godeployments/gpu-operator/values.yamlmanifests/state-dcgm-exporter/0600_service_monitor.yaml
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review.
Description
Adds Helm and ClusterPolicy support for configuring Prometheus
metricRelabelingson the DCGM Exporter ServiceMonitor, addressing #2938.Changes
metricRelabelingsto the shared ServiceMonitor API configuration and generated CRDs/deepcopy assets.Testing
go test ./controllers -run '^TestServiceMonitor$' -count=1✅make unit-test✅make generate manifests✅make validate-generated-assets✅make validate-modules✅make fmt✅make validate-helm-values✅git diff --check✅metricRelabelingsreaches the rendered ClusterPolicy.make lintSA4023findings incmd/nvidia-validator/main.go; no findings are in the changed files.Notes
The generated CRD and bundle changes are included as required by the repository instructions. This contribution was prepared with AI assistance and reviewed against the repository's existing ServiceMonitor implementation and tests.
Fixes #2938