Grant the dcgm-exporter DRA role read access to ConfigMaps - #2724
Merged
rajathagasthya merged 1 commit intoAug 10, 2026
Merged
Conversation
Setting DCGM_EXPORTER_CONFIGMAP_DATA through dcgmExporter.env points the exporter at a ConfigMap of custom metrics that it reads from the Kubernetes API. On the GPUCluster path neither the namespaced Role nor the ClusterRole granted configmaps, so the read failed with a forbidden error and the exporter fell back to its built-in metrics without crashing. The ClusterPolicy path has granted this since before the feature existed. Add configmaps get/list to the namespaced Role. The Role is bound in the operator namespace only, so a namespace:name value pointing elsewhere is still denied. Signed-off-by: Rajath Agasthya <ragasthya@nvidia.com>
rajathagasthya
requested review from
cdesiniotis,
karthikvetrivel,
rahulait,
shivamerla and
tariq1890
as code owners
August 7, 2026 19:00
tariq1890
reviewed
Aug 7, 2026
karthikvetrivel
approved these changes
Aug 10, 2026
rahulait
approved these changes
Aug 10, 2026
tariq1890
reviewed
Aug 10, 2026
tariq1890
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DCGM_EXPORTER_CONFIGMAP_DATAset throughdcgmExporter.envpoints theexporter at a ConfigMap of custom metrics that it reads from the Kubernetes
API. On the GPUCluster path neither the namespaced Role nor the ClusterRole
granted
configmaps, so the read failed with a forbidden error and theexporter fell back to its built-in metrics without crashing. The ClusterPolicy
path has granted this since before the feature existed.
Add
configmapsget/list to the namespaced Role. The Role is bound in theoperator namespace only, so a
namespace:namevalue pointing elsewhere isstill denied.
Verified on a DRA cluster: the ServiceAccount can read ConfigMaps and the
custom metric set is served. Golden fixtures updated to match.
Follow-up to #2721, which fixes the equivalent problem on the ClusterPolicy
path.
Checklist
make lint)make validate-generated-assets)make validate-modules)