struct Kubernetes::CapacityRequestPolicy

Overview

CapacityRequestPolicy defines how requests consume device capacity. Must not set more than one ValidRequestValues.

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 default : Quantity | Nil #

Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity.


def default=(default : Quantity | Nil) #

Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity.


def valid_range : CapacityRequestPolicyRange | Nil #

ValidRange defines an acceptable quantity value range in consuming requests. If this field is set, Default must be defined and it must fall within the defined ValidRange. If the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated. If the request doesn't contain this capacity entry, Default value is used.


def valid_range=(valid_range : CapacityRequestPolicyRange | Nil) #

ValidRange defines an acceptable quantity value range in consuming requests. If this field is set, Default must be defined and it must fall within the defined ValidRange. If the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated. If the request doesn't contain this capacity entry, Default value is used.


def valid_values : Array(Quantity) | Nil #

ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated.


def valid_values=(valid_values : Array(Quantity) | Nil) #

ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated.


def valid_values=(valid_values : Array(Quantity) | Nil) #

ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated.


def valid_values=(valid_values : Array(Quantity) | Nil) #

ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated.