Problem
The GPUCluster DRA stack uses different Service names and pod labels from the existing ClusterPolicy stack.
ClusterPolicy uses:
- DCGM Service:
nvidia-dcgm
- DCGM pod label:
app=nvidia-dcgm
- Exporter Service:
nvidia-dcgm-exporter
- Exporter pod label:
app=nvidia-dcgm-exporter
GPUCluster uses:
- DCGM Service:
nvidia-dcgm-dra
- DCGM pod label:
app=nvidia-dcgm-dra
- Exporter Service:
nvidia-dcgm-exporter-dra
- Exporter pod label:
app=nvidia-dcgm-exporter-dra
The established DNS names and labels are used by downstream services, runbooks, readiness checks, and monitoring configurations. Consumers must now know which allocation stack is active or probe both identities.
This will become more complicated when DRA and non-DRA nodes are supported in the same cluster.
Expected behavior
GPU Operator should provide allocation-mode-independent discovery for DCGM and DCGM Exporter.
Consumers should be able to:
- Use a stable DNS name without detecting the allocation mode.
- Discover either implementation with a common component label.
- Continue using the DRA-specific DNS names where they have already been adopted.
- Avoid duplicate Prometheus scraping when both Service aliases exist.
DaemonSet names, selectors, and app labels can remain implementation-specific.
Proposed common labels
Add the following label to both DCGM DaemonSet metadata and pod-template metadata:
nvidia.com/gpu-operator.dcgm: "true"
Add the following label to both DCGM Exporter DaemonSet metadata and pod-template metadata:
nvidia.com/gpu-operator.dcgm-exporter: "true"
Apply these labels to both:
- The ClusterPolicy manifests under
assets/state-dcgm*
- The GPUCluster manifests under
manifests/state-dcgm*
These labels should be reserved so user-provided DaemonSet labels cannot override them.
Proposed DNS compatibility
For the initial implementation:
The legacy ClusterPolicy stack should continue exposing:
nvidia-dcgm
nvidia-dcgm-exporter
The DRA GPUCluster stack should expose:
nvidia-dcgm
nvidia-dcgm-dra
nvidia-dcgm-exporter
nvidia-dcgm-exporter-dra
This restores the established DNS names for DRA deployments without unnecessarily exposing DRA-specific names from the legacy stack.
Upgrade safety
The initial implementation should not immediately change existing Service selectors to the new common labels.
During an upgrade, existing pods do not receive the new labels until their DaemonSets roll out. If a Service selector changes before that rollout completes, the Service can temporarily lose all or some endpoints.
This is particularly disruptive for DCGM because its Service uses internalTrafficPolicy: Local.
For the initial phase:
- Existing ClusterPolicy Services should retain their existing
app selectors.
- Existing DRA Services should retain their DRA-specific
app selectors.
- New compatibility aliases in the DRA path should initially select the DRA-specific
app labels.
- Common Service selectors should be introduced only after labeled pods have rolled out.
Future coexistence and shared ownership
When ClusterPolicy and GPUCluster are allowed to coexist, the stable Services will become shared resources.
The current reconciliation paths cannot safely co-own these Services:
- Both use controller owner references, but Kubernetes permits only one controller owner.
- Both perform whole-object updates that can overwrite owner references.
- ClusterPolicy directly deletes disabled Services.
- GPUCluster cleanup deletes objects by state label.
- Deleting either CR could remove a Service still needed by the other stack.
Simply replacing SetControllerReference with SetOwnerReference is insufficient.
A future phase should introduce a single shared-Service reconciler that:
- Computes desired Services from both CRs.
- Maintains deterministic non-controller owner references.
- Removes only the disabled or deleted CR's ownership.
- Deletes a Service only when no configuration requires it.
- Preserves API-assigned Service fields.
- Resolves conflicting exporter Service configurations deterministically.
Shared ownership must be implemented before ClusterPolicy and GPUCluster coexistence is enabled.
Monitoring considerations
If both exporter Service aliases select the same pods, monitoring must avoid scraping every exporter twice.
The implementation should define one canonical scrape Service, preferably nvidia-dcgm-exporter, and ensure:
- Only the canonical Service participates in annotation-based discovery.
- Operator-managed ServiceMonitors select only the canonical Service.
- Conflicting ServiceMonitor configurations are reported instead of using last-writer-wins behavior.
Acceptance criteria
Problem
The
GPUClusterDRA stack uses different Service names and pod labels from the existingClusterPolicystack.ClusterPolicy uses:
nvidia-dcgmapp=nvidia-dcgmnvidia-dcgm-exporterapp=nvidia-dcgm-exporterGPUCluster uses:
nvidia-dcgm-draapp=nvidia-dcgm-dranvidia-dcgm-exporter-draapp=nvidia-dcgm-exporter-draThe established DNS names and labels are used by downstream services, runbooks, readiness checks, and monitoring configurations. Consumers must now know which allocation stack is active or probe both identities.
This will become more complicated when DRA and non-DRA nodes are supported in the same cluster.
Expected behavior
GPU Operator should provide allocation-mode-independent discovery for DCGM and DCGM Exporter.
Consumers should be able to:
DaemonSet names, selectors, and
applabels can remain implementation-specific.Proposed common labels
Add the following label to both DCGM DaemonSet metadata and pod-template metadata:
nvidia.com/gpu-operator.dcgm: "true"Add the following label to both DCGM Exporter DaemonSet metadata and pod-template metadata:
nvidia.com/gpu-operator.dcgm-exporter: "true"Apply these labels to both:
assets/state-dcgm*manifests/state-dcgm*These labels should be reserved so user-provided DaemonSet labels cannot override them.
Proposed DNS compatibility
For the initial implementation:
The legacy ClusterPolicy stack should continue exposing:
nvidia-dcgmnvidia-dcgm-exporterThe DRA GPUCluster stack should expose:
nvidia-dcgmnvidia-dcgm-dranvidia-dcgm-exporternvidia-dcgm-exporter-draThis restores the established DNS names for DRA deployments without unnecessarily exposing DRA-specific names from the legacy stack.
Upgrade safety
The initial implementation should not immediately change existing Service selectors to the new common labels.
During an upgrade, existing pods do not receive the new labels until their DaemonSets roll out. If a Service selector changes before that rollout completes, the Service can temporarily lose all or some endpoints.
This is particularly disruptive for DCGM because its Service uses
internalTrafficPolicy: Local.For the initial phase:
appselectors.appselectors.applabels.Future coexistence and shared ownership
When ClusterPolicy and GPUCluster are allowed to coexist, the stable Services will become shared resources.
The current reconciliation paths cannot safely co-own these Services:
Simply replacing
SetControllerReferencewithSetOwnerReferenceis insufficient.A future phase should introduce a single shared-Service reconciler that:
Shared ownership must be implemented before ClusterPolicy and GPUCluster coexistence is enabled.
Monitoring considerations
If both exporter Service aliases select the same pods, monitoring must avoid scraping every exporter twice.
The implementation should define one canonical scrape Service, preferably
nvidia-dcgm-exporter, and ensure:Acceptance criteria
nvidia.com/gpu-operator.dcgm="true".nvidia.com/gpu-operator.dcgm-exporter="true".internalTrafficPolicy: Local.