feat(ksm): grant DRA RBAC for Cluster Agent 7.85.0+; mount CDI dir for GPU monitoring #3703
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 377 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.355
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3703"
general
weight: 0.35
tbavelier
What does this PR do?
kubernetes_state_core(Cluster Agent, or Cluster Checks Runner when KSM runs there) is 7.85.0+, adds aresource.k8s.iolist/watchrule forresourceclaims,resourceslicesanddevicetaintrulesto the KSM ClusterRole. The operator's own ClusterRole gets the same permissions so it can grant them./var/run/cdiread-only at/host/var/run/cdiin the core agent container. The mount is removed on GKE Autopilot.docs/kubernetes_state_metrics.mdhow to enable DRA collection throughconf.configData.Motivation
Cluster Agent 7.85.0 collects Kubernetes DRA metrics when users add the
resourceclaims,resourceslicesanddevicetaintrulescollectors to a custom KSM config. Users can add the collectors themselves but can't grant the RBAC. The CDI specs let the node agent attribute GPUs to pods that got them through DRA.Example
examples/datadogagent/datadog-agent-with-dra.yamlshows a working setup: Cluster Agent and Agent image overrides to7.85.0,features.gpu.enabled: true, andkubeStateMetricsCore.conf.configDatawith the full default collector list plusresourceclaims,resourceslices,devicetaintrules(and an optionaldra_device_classesfilter).Additional Notes
:devget no rule): a Cluster Agent older than 7.85 fails the wholekubernetes_state_corecheck on DRA clusters when given these collector names.Minimum Agent Versions
Agent: none (older agents ignore the CDI mount)
Cluster Agent: v7.85.0 (Cluster Checks Runner v7.85.0 when KSM runs there)
Describe your test plan
Unit tests cover the RBAC version check (Cluster Agent and Cluster Checks Runner, rc and
:devtags, no override, custom conf) and the CDI mount including the Autopilot removal.make gotest,make golden-testandmake lintpass;make generate && make manifestsleaves no diff.To check on a cluster: set the Cluster Agent image to 7.85.0+, add the three collectors through
features.kubeStateMetricsCore.conf.configData, and confirmkubernetes_state.resourceslice.devicesreports with no Forbidden errors in the Cluster Agent logs.Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel[1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits