kubernetes-sigs / prometheus-adapter

An implementation of the custom.metrics.k8s.io API using Prometheus
Apache License 2.0
1.88k stars 548 forks source link

Clarify 'window' usage in configuration #667

Open sebhoss opened 2 weeks ago

sebhoss commented 2 weeks ago

The example config in https://github.com/kubernetes-sigs/prometheus-adapter/blob/master/deploy/manifests/config-map.yaml specifies window: 5m and uses [4m] in some of its queries, yet the code in https://github.com/kubernetes-sigs/prometheus-adapter/blob/master/pkg/config/config.go#L91 mentions that It should match the value used in your containerQuery and nodeQuery if you use a 'rate' function. The example config does use a rate function, but specifies a different value for window which seems to contradict what is written in the code comment.

I could not find any mention of window in the documentation. So what's the point of that option and what value should be set?

k8s-ci-robot commented 2 weeks ago

This issue is currently awaiting triage.

If prometheus-adapter contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.