Skip to content

Commit 793c538

Browse files
committed
Adapt flag names and documentation
1 parent 7a98be0 commit 793c538

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

vertical-pod-autoscaler/docs/flags.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ This document is auto-generated from the flag definitions in the VPA recommender
5454
| `--alsologtostderr` | | log to standard error as well as files (no effect when -logtostderr=true) |
5555
| `--checkpoints-gc-interval` | 10m0s | How often orphaned checkpoints should be garbage collected |
5656
| `--checkpoints-timeout` | 1m0s | Timeout for writing checkpoints since the start of the recommender's main loop |
57+
| `--confidence-interval-cpu` | 24h0m0s | The time interval used for computing the confidence multiplier for the CPU lower and upper bound. Default: 24h |
58+
| `--confidence-interval-memory` | 24h0m0s | The time interval used for computing the confidence multiplier for the memory lower and upper bound. Default: 24h |
5759
| `--container-name-label` | "name" | Label name to look for container names |
5860
| `--container-namespace-label` | "namespace" | Label name to look for container namespaces |
5961
| `--container-pod-name-label` | "pod_name" | Label name to look for container pod names |
6062
| `--container-recommendation-max-allowed-cpu` | | Maximum amount of CPU that will be recommended for a container. VerticalPodAutoscaler-level maximum allowed takes precedence over the global maximum allowed. |
6163
| `--container-recommendation-max-allowed-memory` | | Maximum amount of memory that will be recommended for a container. VerticalPodAutoscaler-level maximum allowed takes precedence over the global maximum allowed. |
62-
| `--cpu-confidence-interval` | 24h0m0s | The time interval used for computing the confidence multiplier for the CPU target recommendation. Default: 24h |
6364
| `--cpu-histogram-decay-half-life` | 24h0m0s | The amount of time it takes a historical CPU usage sample to lose half of its weight. |
6465
| `--cpu-integer-post-processor-enabled` | | Enable the cpu-integer recommendation post processor. The post processor will round up CPU recommendations to a whole CPU for pods which were opted in by setting an appropriate label on VPA object (experimental) |
6566
| `--external-metrics-cpu-metric` | | ALPHA. Metric to use with external metrics provider for CPU usage. |
@@ -85,7 +86,6 @@ This document is auto-generated from the flag definitions in the VPA recommender
8586
| `--logtostderr` | true | log to standard error instead of files |
8687
| `--memory-aggregation-interval` | 24h0m0s | The length of a single interval, for which the peak memory usage is computed. Memory usage peaks are aggregated in multiples of this interval. In other words there is one memory usage sample per interval (the maximum usage over that interval) |
8788
| `--memory-aggregation-interval-count` | 8 | The number of consecutive memory-aggregation-intervals which make up the MemoryAggregationWindowLength which in turn is the period for memory usage aggregation by VPA. In other words, MemoryAggregationWindowLength = memory-aggregation-interval * memory-aggregation-interval-count. |
88-
| `--memory-confidence-interval` | 24h0m0s | The time interval used for computing the confidence multiplier for the memory target recommendation. Default: 24h |
8989
| `--memory-histogram-decay-half-life` | 24h0m0s | The amount of time it takes a historical memory usage sample to lose half of its weight. In other words, a fresh usage sample is twice as 'important' as one with age equal to the half life period. |
9090
| `--memory-saver` | | If true, only track pods which have an associated VPA |
9191
| `--metric-for-pod-labels` | "up{job=\"kubernetes-pods\"}" | Which metric to look for pod labels in metrics |

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ var (
3232
targetCPUPercentile = flag.Float64("target-cpu-percentile", 0.9, "CPU usage percentile that will be used as a base for CPU target recommendation. Doesn't affect CPU lower bound, CPU upper bound nor memory recommendations.")
3333
lowerBoundCPUPercentile = flag.Float64("recommendation-lower-bound-cpu-percentile", 0.5, `CPU usage percentile that will be used for the lower bound on CPU recommendation.`)
3434
upperBoundCPUPercentile = flag.Float64("recommendation-upper-bound-cpu-percentile", 0.95, `CPU usage percentile that will be used for the upper bound on CPU recommendation.`)
35-
cpuConfidenceInterval = flag.Duration("cpu-confidence-interval", time.Hour*24, "The time interval used for computing the confidence multiplier for the CPU target recommendation. Default: 24h")
35+
confidenceIntervalCPU = flag.Duration("confidence-interval-cpu", time.Hour*24, "The time interval used for computing the confidence multiplier for the CPU lower and upper bound. Default: 24h")
3636
targetMemoryPercentile = flag.Float64("target-memory-percentile", 0.9, "Memory usage percentile that will be used as a base for memory target recommendation. Doesn't affect memory lower bound nor memory upper bound.")
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.`)
39-
memoryConfidenceInterval = flag.Duration("memory-confidence-interval", time.Hour*24, "The time interval used for computing the confidence multiplier for the memory target recommendation. Default: 24h")
39+
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")
4040
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.")
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
)
@@ -150,8 +150,8 @@ func CreatePodResourceRecommender() PodResourceRecommender {
150150
// 24h history : *2
151151
// 1 week history : *1.14
152152

153-
upperBoundCPU = WithCPUConfidenceMultiplier(1.0, 1.0, upperBoundCPU, *cpuConfidenceInterval)
154-
upperBoundMemory = WithMemoryConfidenceMultiplier(1.0, 1.0, upperBoundMemory, *memoryConfidenceInterval)
153+
upperBoundCPU = WithCPUConfidenceMultiplier(1.0, 1.0, upperBoundCPU, *confidenceIntervalCPU)
154+
upperBoundMemory = WithMemoryConfidenceMultiplier(1.0, 1.0, upperBoundMemory, *confidenceIntervalMemory)
155155

156156
// Apply confidence multiplier to the lower bound estimator. This means
157157
// that the updater will be less eager to evict pods with short history
@@ -165,8 +165,8 @@ func CreatePodResourceRecommender() PodResourceRecommender {
165165
// 5m history : *0.6 (force pod eviction if the request is < 0.6 * lower bound)
166166
// 30m history : *0.9
167167
// 60m history : *0.95
168-
lowerBoundCPU = WithCPUConfidenceMultiplier(0.001, -2.0, lowerBoundCPU, *cpuConfidenceInterval)
169-
lowerBoundMemory = WithMemoryConfidenceMultiplier(0.001, -2.0, lowerBoundMemory, *memoryConfidenceInterval)
168+
lowerBoundCPU = WithCPUConfidenceMultiplier(0.001, -2.0, lowerBoundCPU, *confidenceIntervalCPU)
169+
lowerBoundMemory = WithMemoryConfidenceMultiplier(0.001, -2.0, lowerBoundMemory, *confidenceIntervalMemory)
170170
return &podResourceRecommender{
171171
targetCPU,
172172
targetMemory,

0 commit comments

Comments
 (0)