Skip to content

Commit 829fa63

Browse files
committed
DRA: fix allocation mode All
`All` allocation mode should mean 'at least one' for DRA. Allocation should fail if `All` devices requested and none found.
1 parent fc7520b commit 829fa63

File tree

13 files changed

+88
-13
lines changed

13 files changed

+88
-13
lines changed

api/openapi-spec/swagger.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/resource/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,11 @@ type DeviceRequest struct {
430430
// count field.
431431
//
432432
// - All: This request is for all of the matching devices in a pool.
433+
// At least one device must exist on the node for the allocation to succeed.
433434
// Allocation will fail if some devices are already allocated,
434435
// unless adminAccess is requested.
435436
//
436-
// If AlloctionMode is not specified, the default mode is ExactCount. If
437+
// If AllocationMode is not specified, the default mode is ExactCount. If
437438
// the mode is ExactCount and count is not specified, the default count is
438439
// one. Any other requests must specify this field.
439440
//

pkg/generated/openapi/zz_generated.openapi.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/resource/v1alpha3/generated.proto

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/resource/v1alpha3/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,11 @@ type DeviceRequest struct {
428428
// count field.
429429
//
430430
// - All: This request is for all of the matching devices in a pool.
431+
// At least one device must exist on the node for the allocation to succeed.
431432
// Allocation will fail if some devices are already allocated,
432433
// unless adminAccess is requested.
433434
//
434-
// If AlloctionMode is not specified, the default mode is ExactCount. If
435+
// If AllocationMode is not specified, the default mode is ExactCount. If
435436
// the mode is ExactCount and count is not specified, the default count is
436437
// one. Any other requests must specify this field.
437438
//

staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/resource/v1beta1/generated.proto

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/resource/v1beta1/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,11 @@ type DeviceRequest struct {
436436
// count field.
437437
//
438438
// - All: This request is for all of the matching devices in a pool.
439+
// At least one device must exist on the node for the allocation to succeed.
439440
// Allocation will fail if some devices are already allocated,
440441
// unless adminAccess is requested.
441442
//
442-
// If AlloctionMode is not specified, the default mode is ExactCount. If
443+
// If AllocationMode is not specified, the default mode is ExactCount. If
443444
// the mode is ExactCount and count is not specified, the default count is
444445
// one. Any other requests must specify this field.
445446
//

0 commit comments

Comments
 (0)