Skip to content

Grant the dcgm-exporter DRA role read access to ConfigMaps - #2724

Merged
rajathagasthya merged 1 commit into
NVIDIA:mainfrom
rajathagasthya:dcgm-exporter-dra-configmap-rbac
Aug 10, 2026
Merged

Grant the dcgm-exporter DRA role read access to ConfigMaps#2724
rajathagasthya merged 1 commit into
NVIDIA:mainfrom
rajathagasthya:dcgm-exporter-dra-configmap-rbac

Conversation

@rajathagasthya

@rajathagasthya rajathagasthya commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

DCGM_EXPORTER_CONFIGMAP_DATA set 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.

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

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint)
  • Generated assets in-sync (make validate-generated-assets)
  • Go mod artifacts in-sync (make validate-modules)
  • Test cases are added for new code paths

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>
Comment thread manifests/state-dcgm-exporter/0200_role.yaml
@rajathagasthya
rajathagasthya merged commit c9cb644 into NVIDIA:main Aug 10, 2026
20 checks passed
@rajathagasthya
rajathagasthya deleted the dcgm-exporter-dra-configmap-rbac branch August 10, 2026 19:56
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.

4 participants