struct
Kubernetes::CapacityRequestPolicyRange
- Kubernetes::CapacityRequestPolicyRange
- Struct
- Value
- Object
Overview
CapacityRequestPolicyRange defines a valid range for consumable capacity values.
- If the requested amount is less than Min, it is rounded up to the Min value.
- If Step is set and the requested amount is between Min and Max but not aligned with Step, it will be rounded up to the next value equal to Min + (n * Step).
- If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set).
- If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy, and the device cannot be allocated.
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
-
#max : Quantity | Nil
Max defines the upper limit for capacity that can be requested.
-
#max=(max : Quantity | Nil)
Max defines the upper limit for capacity that can be requested.
-
#min : Quantity | Nil
Min specifies the minimum capacity allowed for a consumption request.
-
#min=(min : Quantity | Nil)
Min specifies the minimum capacity allowed for a consumption request.
-
#step : Quantity | Nil
Step defines the step size between valid capacity amounts within the range.
-
#step=(step : Quantity | Nil)
Step defines the step size between valid capacity amounts within the range.
Constructor Detail
Macro Detail
Helper macro for defining fields with automatic camelCase conversion
Instance Method Detail
Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum.
Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum.
Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum.
Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum.
Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value.