OS
Schema Hub

DeviceCapacity

DeviceCapacity describes a quantity associated with a device.

Schema URL
https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/resource.api.k8s.io/DeviceCapacity_v1beta2.json
Usage examples
VS Code / yaml-language-server
# yaml-language-server: $schema=https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/resource.api.k8s.io/DeviceCapacity_v1beta2.json
kubeconform
kubeconform -schema-location 'https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/{{ .Group }}/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json' manifest.yaml

Resource Structure

requestPolicyobject
RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations. The Device must have allowMultipleAllocations set to true in order to set a requestPolicy. If unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device's defined capacity. If request is also unset, default is the full capacity value.
valueobjectRequired
Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value.

Version Diff

Compare: