mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Revert "Move resource.Quantity rounding to defaulter"
This reverts commit 5b18b4e515.
This commit is contained in:
@@ -52,21 +52,9 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
SetDefaults_LimitRangeItem,
|
||||
SetDefaults_ConfigMap,
|
||||
SetDefaults_RBDVolumeSource,
|
||||
SetDefaults_ResourceList,
|
||||
)
|
||||
}
|
||||
|
||||
func SetDefaults_ResourceList(obj *ResourceList) {
|
||||
for key, val := range *obj {
|
||||
// TODO(#18538): We round up resource values to milli scale to maintain API compatibility.
|
||||
// In the future, we should instead reject values that need rounding.
|
||||
const milliScale = -3
|
||||
val.RoundUp(milliScale)
|
||||
|
||||
(*obj)[ResourceName(key)] = val
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_PodExecOptions(obj *PodExecOptions) {
|
||||
obj.Stdout = true
|
||||
obj.Stderr = true
|
||||
|
||||
Reference in New Issue
Block a user