struct
Kubernetes::DeviceCapacity
- Kubernetes::DeviceCapacity
- Struct
- Value
- Object
Overview
DeviceCapacity describes a quantity associated with a device.
Included Modules
- JSON::Serializable
- Kubernetes::Serializable
- YAML::Serializable
Defined in:
generated/models/io_k8s_api_resource_v1.crgenerated/models/io_k8s_api_resource_v1beta1.cr
generated/models/io_k8s_api_resource_v1beta2.cr
Constructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : ::JSON::PullParser)
- .new(*, __pull_for_json_serializable pull : ::JSON::PullParser)
- .new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Macro Summary
-
field(name, type = nil, **options, &block)
Helper macro for defining fields with automatic camelCase conversion
Instance Method Summary
-
#request_policy : CapacityRequestPolicy | Nil
RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.
-
#request_policy=(request_policy : CapacityRequestPolicy | Nil)
RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.
-
#value : Quantity | Nil
Value defines how much of a certain capacity that device has.
-
#value=(value : Quantity | Nil)
Value defines how much of a certain capacity that device has.
Constructor Detail
Macro Detail
Helper macro for defining fields with automatic camelCase conversion
Instance Method Detail
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.
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.
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.