Add DRA support to the topology-aware policy #774
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 441 lines diff across 5 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.364
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #774"
general
weight: 0.35
bart0sh
This PR adds optional DRA integration to the topology-aware policy, letting workloads request high-priority
PCT(Performance/Turbo Class) CPUs via aKubernetesResourceClaiminstead of (or alongside) the existingNRI-based allocation path.What's included
Kubernetesclient wrapper (pkg/kubernetes/client) and a genericDRAkubelet-pluginskeleton (pkg/resmgr/dra), independent of any specific policy.cpuClass.dra.publishconfig field, plusValidateCPUClassesForDRAguarding against overcommitting a turbo-frequency tier when multiple classes are published.pct.PickHpCpus/ReleaseHpCpus/Punits, giving theDRAdriver a way to allocate and release high-priority CPUs from the existingPCT/SST-TFpunit accounting.DRAdevice builder (cpuclass.dra.go) that publishes one device per high-prioritycpuClass×SST-TFpunit, exposingnri/pctPriority,nri/packageID,nri/punitIDas selectable device attributes.PrepareResourceClaims/UnprepareResourceClaims,CDIspec writing,claim-statepersistence and restart recovery).Setup/Start/Stop/Reconfigureintegration, pool-supply accounting for claimed CPUs (multi-container claims via a refcount), and safe refusal of dra.enabled flips orDRA-attribute changes on classes with live claims.config.dra.{enabled,sharedCounters}values,RBAC, host mounts, and the baseDeviceClass.test20-dra) covering claim -> pod ->CLOS-association → scheduler-accounting → cleanup, with a feature-gate probe that skips cleanly on clusters without theKEP-5075/KEP-5517gates.Requirements
Kubernetes 1.34+for KEP-5075 (DRAConsumableCapacity) — required.Kubernetes 1.37+forKEP-5517(DRANodeAllocatableResources) — optional; without itDRAallocation still works but scheduler-side capacity accounting is skipped.Known v1 limitations (by design, not oversights)
PCTclasses are published asDRAdevices; non-HP classes and CEL selectors targeting them are rejected at Prepare time.config.dra.sharedCountersis accepted by the schema but rejected at validation time — it's reserved for (KEP-5941) shared-counter publication, which isn't implemented yet.DRA-claimedCPUcan still collide with aCPUalready exclusively granted to a reserved-type container (updateSharedAllocations doesn't re-pin/evict reserved grants); tracked as a follow-up.dra.enabled: true with local-file (non-Kubernetes) configuration degrades toDRA-disabled for the process lifetime rather than retrying, since the agent skips kube-client setup in that mode.Reconfigure()support forDRAconfig changes (validatedcpuClassedits, live-claim-aware refusal, PostReconfigure-deferred republish) was implemented and then deferred to a future PR — not because it doesn't work, but to keep this PR's diff reviewable. Right now, any config change whileDRAis (or was) enabled is refused outright with a restart-required error.Testing
test20-drae2e test, run against a liveKubernetes 1.37cluster with both feature gates enabled.