struct Kubernetes::DeviceCapacity

Overview

DeviceCapacity describes a quantity associated with a device.

Included Modules

Defined in:

generated/models/io_k8s_api_resource_v1.cr
generated/models/io_k8s_api_resource_v1beta1.cr
generated/models/io_k8s_api_resource_v1beta2.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : ::JSON::PullParser) #

def self.new(*, __pull_for_json_serializable pull : ::JSON::PullParser) #

def self.new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node) #

Macro Detail

macro field(name, type = nil, **options, &block) #

Helper macro for defining fields with automatic camelCase conversion


Instance Method Detail

def request_policy : CapacityRequestPolicy | Nil #

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.


def 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. 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.


def value : Quantity | Nil #

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.


def value=(value : Quantity | Nil) #

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.