docs(vpa): document Prometheus history provider behavior#9724
docs(vpa): document Prometheus history provider behavior#9724ulascansenturk wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ulascansenturk The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
This issue is currently awaiting triage. If SIG Autoscaling contributors determines this is a relevant issue, they will accept it by applying the The DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @ulascansenturk! |
|
Hi @ulascansenturk. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Hi @adrianmoisey, I picked this one up. I noticed your earlier comment about possibly deprecating the Prometheus history provider since nobody is maintaining it right now. Before this gets merged I wanted to check whether improving these docs is still worth it, or whether you'd rather hold off because deprecation is coming soon. Happy either way, I just don't want to add docs for something you're about to remove. Two other things while I'm here. While verifying the behavior for this PR I think I ran into a separate bug. If the integration mainly needs someone to keep an eye on it, I'm happy to keep working in this area and help out with the open Prometheus issues. |
34ff653 to
1b856cb
Compare
Heya Thanks for doing this, I think we're good to merge it anyway. We've had no formal discussions around deprecation, so let's work on the assumption that it's sticking around for now. |
| > History is loaded **once, at recommender startup**. If Prometheus cannot be reached at | ||
| > that time, the error is logged (`Cannot get cluster history`) and the recommender | ||
| > continues **without** any historical data — it does not retry, crash, or fall back to | ||
| > checkpoints. It will only have the live samples it gathers from the metrics server from | ||
| > that point on. If you expect history to be loaded, confirm the recommender can reach | ||
| > `--prometheus-address` at startup. |
There was a problem hiding this comment.
This sort of thing is great, thanks!
I didn't know this happened, and I'm assuming users don't know that either.
|
/ok-to-test |
There was a problem hiding this comment.
There's a table of contents at the start of this markdown file that also needs updating
There was a problem hiding this comment.
Updated the TOC with hack/update-toc.sh; both new sections are in it now.
Document two behaviors of the VPA recommender's Prometheus history provider that were previously undocumented: - How Pod labels are loaded via the --metric-for-pod-labels and --pod-label-prefix flags (including the kube-state-metrics setup), so historical metrics from deleted Pods can be matched to a VPA. - That storage=prometheus disables checkpoint writing, and that history is loaded once at startup and silently skipped if Prometheus is unreachable. Signed-off-by: ulascansenturk <ulascansenturk@protonmail.com>
1b856cb to
600df0a
Compare
|
Thanks for the review and for clearing up the deprecation question. I updated the table of contents with mdtoc ( On the separate bug I mentioned ( |
|
Thanks for doing this. I'd like to actually walk through the code to double check this one, before approving it. Since I'm not very familiar with the promtheus parts of VPA |
/area vertical-pod-autoscaler
/kind documentation
What this PR does / why we need it:
Documents two behaviors of the VPA recommender's Prometheus history provider that were previously undocumented (raised in #9228):
--metric-for-pod-labelsand--pod-label-prefixare used to reconstruct Pod labels (including a kube-state-metrics setup), so that historical metrics belonging to already-deleted Pods can be matched to a VPA object. Also notes that the label metric must be a range query.--storage=prometheusdisables VPACheckpoint writing entirely, and that history is loaded only once at startup and is silently skipped (logged, not retried) if Prometheus is unreachable.No code changes; documentation only.
Which issue(s) this PR fixes:
Fixes #9228
Special notes for your reviewer:
Findings originally reported by @plkokanov and @vitanovs in the issue. I verified each against the recommender source (
history_provider.go,recommender_controller.go,cluster_feeder.go) before writing.Does this PR introduce a user-facing change?: