Skip to content

Commit d6c98bc

Browse files
authored
deprecate humanized memory flag (#8400)
* deprecate humanized memory flag Signed-off-by: Omer Aplatony <[email protected]> * Update feature added version Signed-off-by: Omer Aplatony <[email protected]> * Update feature added version Signed-off-by: Omer Aplatony <[email protected]> * Update feature added version Signed-off-by: Omer Aplatony <[email protected]> --------- Signed-off-by: Omer Aplatony <[email protected]>
1 parent 135e662 commit d6c98bc

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

vertical-pod-autoscaler/docs/features.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ To disable getting VPA recommendations for an individual container, set `mode` t
2323

2424
## Memory Value Humanization
2525

26+
> [!WARNING]
27+
> DEPRECATED: This feature is deprecated as of VPA v1.5.0 and will be removed in a future version. Use `--round-memory-bytes` instead for memory recommendation formatting.
28+
29+
> [!NOTE]
30+
> This feature was added in v1.3.0.
31+
32+
2633
VPA can present memory recommendations in human-readable binary units (KiB, MiB, GiB, TiB) instead of raw bytes, making resource recommendations easier to understand. This feature is controlled by the `--humanize-memory` flag in the recommender component.
2734

2835
When enabled, memory values in recommendations will be:

vertical-pod-autoscaler/docs/flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ This document is auto-generated from the flag definitions in the VPA recommender
7171
| `feature-gates` | mapStringBool | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:<br>AllAlpha=true\|false (ALPHA - default=false)<br>AllBeta=true\|false (BETA - default=false)<br>InPlaceOrRecreate=true\|false (ALPHA - default=false) |
7272
| `history-length` | string | "8d" | How much time back prometheus have to be queried to get historical metrics |
7373
| `history-resolution` | string | "1h" | Resolution at which Prometheus is queried for historical metrics |
74-
| `humanize-memory` | | | Convert memory values in recommendations to the highest appropriate SI unit with up to 2 decimal places for better readability. |
74+
| `humanize-memory` | | | DEPRECATED: Convert memory values in recommendations to the highest appropriate SI unit with up to 2 decimal places for better readability. This flag is deprecated and will be removed in a future version. Use --round-memory-bytes instead. |
7575
| `ignored-vpa-object-namespaces` | string | | A comma-separated list of namespaces to ignore when searching for VPA objects. Leave empty to avoid ignoring any namespaces. These namespaces will not be cleaned by the garbage collector. |
7676
| `kube-api-burst` | float | 100 | QPS burst limit when making requests to Kubernetes apiserver |
7777
| `kube-api-qps` | float | 50 | QPS limit when making requests to Kubernetes apiserver |

vertical-pod-autoscaler/pkg/recommender/logic/recommender.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var (
3737
lowerBoundMemoryPercentile = flag.Float64("recommendation-lower-bound-memory-percentile", 0.5, `Memory usage percentile that will be used for the lower bound on memory recommendation.`)
3838
upperBoundMemoryPercentile = flag.Float64("recommendation-upper-bound-memory-percentile", 0.95, `Memory usage percentile that will be used for the upper bound on memory recommendation.`)
3939
confidenceIntervalMemory = flag.Duration("confidence-interval-memory", time.Hour*24, "The time interval used for computing the confidence multiplier for the memory lower and upper bound. Default: 24h")
40-
humanizeMemory = flag.Bool("humanize-memory", false, "Convert memory values in recommendations to the highest appropriate SI unit with up to 2 decimal places for better readability.")
40+
humanizeMemory = flag.Bool("humanize-memory", false, "DEPRECATED: Convert memory values in recommendations to the highest appropriate SI unit with up to 2 decimal places for better readability. This flag is deprecated and will be removed in a future version. Use --round-memory-bytes instead.")
4141
roundCPUMillicores = flag.Int("round-cpu-millicores", 1, `CPU recommendation rounding factor in millicores. The CPU value will always be rounded up to the nearest multiple of this factor.`)
4242
roundMemoryBytes = flag.Int("round-memory-bytes", 1, `Memory recommendation rounding factor in bytes. The Memory value will always be rounded up to the nearest multiple of this factor.`)
4343
)

vertical-pod-autoscaler/pkg/recommender/model/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func ResourcesAsResourceList(resources Resources, humanizeMemory bool, roundCPUM
115115
if humanizeMemory && !quantity.IsZero() {
116116
rawValues := quantity.Value()
117117
humanizedValue := HumanizeMemoryQuantity(rawValues)
118-
klog.V(4).InfoS("Converting raw value to humanized value", "rawValue", rawValues, "humanizedValue", humanizedValue)
118+
klog.V(4).InfoS("DEPRECATED: Converting raw value to humanized value. Use --round-memory-bytes instead.", "rawValue", rawValues, "humanizedValue", humanizedValue)
119119
quantity = resource.MustParse(humanizedValue)
120120
}
121121
default:

0 commit comments

Comments
 (0)