From c7a90e2021efda312c8c30033651c5fb20ec5a40 Mon Sep 17 00:00:00 2001 From: Sunyanan Choochotkaew Date: Sun, 19 Jul 2026 21:43:03 +0900 Subject: [PATCH] DRA: generated codes from FractionalCapacityRange Signed-off-by: Sunyanan Choochotkaew Kubernetes-commit: 9f2643c6b8835dd87acc614c66e52fac3a15e569 --- .../resource/v1/capacityrequestpolicyrange.go | 7 +++++++ .../resource/v1beta1/capacityrequestpolicyrange.go | 7 +++++++ .../resource/v1beta2/capacityrequestpolicyrange.go | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/applyconfigurations/resource/v1/capacityrequestpolicyrange.go b/applyconfigurations/resource/v1/capacityrequestpolicyrange.go index b3bade611..057b1dfd1 100644 --- a/applyconfigurations/resource/v1/capacityrequestpolicyrange.go +++ b/applyconfigurations/resource/v1/capacityrequestpolicyrange.go @@ -27,6 +27,13 @@ import ( // // CapacityRequestPolicyRange defines a valid range for consumable capacity values. // +// If the DRAFractionalCapacityRange feature gate is +// enabled and at least one of Min, Max, or Step is a fractional quantity (i.e. +// its value is not an integer), milli-unit arithmetic is used instead, +// supporting values with up to 3 decimal places (e.g. 100m = 0.1). +// The largest supported value then is 1000 times smaller compared to using 64-bit integers. +// Otherwise, all comparisons use 64-bit integer arithmetic via resource.Quantity.Value(). +// // - 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). diff --git a/applyconfigurations/resource/v1beta1/capacityrequestpolicyrange.go b/applyconfigurations/resource/v1beta1/capacityrequestpolicyrange.go index cddfe6daf..9216d4deb 100644 --- a/applyconfigurations/resource/v1beta1/capacityrequestpolicyrange.go +++ b/applyconfigurations/resource/v1beta1/capacityrequestpolicyrange.go @@ -27,6 +27,13 @@ import ( // // CapacityRequestPolicyRange defines a valid range for consumable capacity values. // +// If the DRAFractionalCapacityRange feature gate is +// enabled and at least one of Min, Max, or Step is a fractional quantity (i.e. +// its value is not an integer), milli-unit arithmetic is used instead, +// supporting values with up to 3 decimal places (e.g. 100m = 0.1). +// The largest supported value then is 1000 times smaller compared to using 64-bit integers. +// Otherwise, all comparisons use 64-bit integer arithmetic via resource.Quantity.Value(). +// // - 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). diff --git a/applyconfigurations/resource/v1beta2/capacityrequestpolicyrange.go b/applyconfigurations/resource/v1beta2/capacityrequestpolicyrange.go index bd9a73422..60e71b904 100644 --- a/applyconfigurations/resource/v1beta2/capacityrequestpolicyrange.go +++ b/applyconfigurations/resource/v1beta2/capacityrequestpolicyrange.go @@ -27,6 +27,13 @@ import ( // // CapacityRequestPolicyRange defines a valid range for consumable capacity values. // +// If the DRAFractionalCapacityRange feature gate is +// enabled and at least one of Min, Max, or Step is a fractional quantity (i.e. +// its value is not an integer), milli-unit arithmetic is used instead, +// supporting values with up to 3 decimal places (e.g. 100m = 0.1). +// The largest supported value then is 1000 times smaller compared to using 64-bit integers. +// Otherwise, all comparisons use 64-bit integer arithmetic via resource.Quantity.Value(). +// // - 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).