Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPA: Default values are not correct in the generated docs for flags #7778

Open
ialidzhikov opened this issue Jan 29, 2025 · 3 comments
Open
Labels
area/vertical-pod-autoscaler kind/bug Categorizes issue or PR as related to a bug.

Comments

@ialidzhikov
Copy link
Contributor

Which component are you using?:
/area vertical-pod-autoscaler

What version of the component are you using?:

Component version: v0.13.0

What k8s version are you using (kubectl version)?:

kubectl version Output
$ kubectl version

What environment is this in?:

What did you expect to happen?:

Flags like --memory-aggregation-interval and --memory-aggregation-interval-count to have a correct default value in the generated docs.

What happened instead?:

In https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/docs/flags.md, the default values for some flags are wrong.
For example, --memory-aggregation-interval has default value of 24h, --memory-aggregation-interval-count has default value of 8.

memoryAggregationInterval = flag.Duration("memory-aggregation-interval", model.DefaultMemoryAggregationInterval, `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)`)
memoryAggregationIntervalCount = flag.Int64("memory-aggregation-interval-count", model.DefaultMemoryAggregationIntervalCount, `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.`)

// DefaultMemoryAggregationIntervalCount is the default value for MemoryAggregationIntervalCount.
DefaultMemoryAggregationIntervalCount = 8
// DefaultMemoryAggregationInterval is the default value for MemoryAggregationInterval.
// which the peak memory usage is computed.
DefaultMemoryAggregationInterval = time.Hour * 24

On the other side, in the docs these flags have 0 as default value:

| --memory-aggregation-interval | Duration | 0 | `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)` |
| --memory-aggregation-interval-count | Int64 | 0 | `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.` |

How to reproduce it (as minimally and precisely as possible):

See above.

Anything else we need to know?:

N/A

@ialidzhikov ialidzhikov added the kind/bug Categorizes issue or PR as related to a bug. label Jan 29, 2025
@ialidzhikov
Copy link
Contributor Author

cc @omerap12

@omerap12
Copy link
Member

Yes, we have a pending PR that addresses this issue (though not entirely): #7642

We also plan to modify the process for generating the flag documentation, similar to what’s done with CA: Comment on PR #7642.

I plan to work on that but currently have capacity issue.

@omerap12
Copy link
Member

Opened this: #7779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants