You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -163,8 +164,10 @@ objects as privileged. This feature includes:
163
164
name: admin-resource-claim
164
165
namespace: admin-namespace
165
166
spec:
166
-
resourceClassName: admin-resource-class
167
-
adminAccess: true
167
+
devices:
168
+
requests:
169
+
- deviceClassName: admin-resource-class
170
+
adminAccess: true
168
171
```
169
172
170
173
1. Namespace Label for DRA Admin Mode:
@@ -222,6 +225,16 @@ objects as privileged. This feature includes:
222
225
1. The DRA controller processes the request and grants privileged access to the
223
226
requested device.
224
227
228
+
### Risks and Mitigations
229
+
230
+
This feature makes the assumption that an admin will only perform read-only
231
+
monitoring and troubleshooting operations. However, it is possible that an admin
232
+
also performs write access to the device. This risk can be mitigated by the DRA
233
+
driver to ensure AdminAccess ResourceClaims can only execute read-only
234
+
operations on the device. We can add a warning in the driver documentation.
235
+
However, what additional permissions are granted or needed for admin operations
236
+
is up to the DRA driver implementation.
237
+
225
238
## Design Details
226
239
227
240
### API Changes
@@ -293,13 +306,16 @@ admin namespace label.
293
306
294
307
In pkg/controller/resourceclaim/controller.go, process requests in `handleClaim`
295
308
function to prevent creation of `ResourceClaim` when the `ResourceClaimTemplate`
296
-
has the `adminAccess` field while the feature gate is turned off.
309
+
has the `adminAccess` field while the feature gate is turned off. This behavior
310
+
was added in 1.32.
297
311
298
312
### Kube-scheduler Changes
299
313
300
314
In pkg/scheduler/framework/plugins/dynamicresources/allocateddevices.go, handle
301
315
claims with `adminAccess` to ensure devices allocated with `adminAccess` are
302
-
skipped without invoking the callback bypassing standard allocation checks.
316
+
skipped without invoking the callback bypassing standard allocation checks and
317
+
these devices are not considered as allocated. This behavior was added in 1.32
318
+
in `foreachAllocatedDevice`.
303
319
304
320
### ResourceQuota
305
321
@@ -332,11 +348,19 @@ This can inform certain test coverage improvements that we want to do before
332
348
extending the production code to implement this enhancement.
333
349
- `<package>`: `<date>`- `<test coverage>`
334
350
-->
351
+
<!--
352
+
Generated with:
353
+
354
+
go test -cover ./pkg/registry/resource/resourceclaim ./pkg/registry/resource/resourceclaimtemplate ./pkg/scheduler/framework/plugins/dynamicresources/... ./pkg/controller/resourceclaim | sed -e 's/.*\(k8s.io[a-z/-]*\).*coverage: \(.*\) of statements/- `\1`: \2/' | sort
355
+
356
+
-->
335
357
336
-
Start of v1.33 development cycle (v1.33.0-alpha.1-):
358
+
During v1.33 development cycle, 2025-02-08 as of git commit 69ab91a:
0 commit comments