Add granular DRA status RBAC permissions for ResourceClaim driver updates#54
Add granular DRA status RBAC permissions for ResourceClaim driver updates#54qingketsing wants to merge 1 commit into
Conversation
Signed-off-by: Qingke <ljw329426@163.com>
cac08c2 to
3e2e9bf
Compare
|
Adding context for reviewers: this change is to align the controller RBAC with the Kubernetes DRA granular status authorization update in v1.36. Related upstream tracking issue: This controller updates |
|
@qingketsing We will wait for the result of that verification before proceeding with the dds side, and will revisit this PR once it is confirmed. |
|
Thanks for the context. That makes sense. I’ll wait for the verification result of CoHDI/cohdi-chart#7, and I’m happy to adjust this PR based on the confirmed direction for the chart side. |
|
Thanks for putting this together. I think there may be one additional piece needed based on the upstream granular authorization implementation. The authorizer performs per-driver matching on resourceNames:
- gpu.nvidia.comFrom the discussion on Without Happy to open a follow-up commit/PR if useful. |
|
@Fresnel-Fabian That makes sense to me. If the upstream authorizer performs per-driver matching for In that case, the controller could still fail authorization when trying to update Since CoHDI currently only supports resourceNames:
- gpu.nvidia.comto the I’ll wait for the maintainers’ confirmation, especially while the related chart-side verification is still in progress, and I’m happy to update this PR accordingly if this is the intended RBAC shape. |
Summary
This PR updates
dynamic-device-scalerRBAC to align with the Kubernetes v1.36 DRA granular status authorization changes.The controller updates
ResourceClaim.status.devices, so in addition to the existingresourceclaims/statuspermission it also needsresourceclaims/driverpermissions with thearbitrary-nodeverbs.Changes
resourceclaims/driverpermissions to the controller RBACarbitrary-node:updatearbitrary-node:patchresourceclaims/statuspermissionsWhy
Starting in Kubernetes v1.36, DRA components that update
ResourceClaim.status.devicesneed additional authorization on the syntheticresourceclaims/driversubresource.This controller runs as a control-plane
Deployment, soarbitrary-node:*is the appropriate permission model.Verification
go test ./...