-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Require prometheus storage to init history and add option to explicitly not use history storage #6054
base: master
Are you sure you want to change the base?
Conversation
…s-during-prometheus-history-loading
Welcome @Evedel! |
…er to init history
783802c
to
e90294c
Compare
1b14567
to
dc3ee8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
…s-during-prometheus-history-loading
if len(clusterHistory) == 0 { | ||
klog.Warningf("history provider returned no pods") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This potentially could also be an error/restart, but some (valid?) cases are possible, so leaving with a warning for now.
As for the error cases, at the moment --metric-for-pod-labels=up{job=\"kubernetes-pods\"}
, if prom is not configured to have a given pair of job/metric, the query will not return any results, so history will not be used (and users won't be notified about the misconfiguration either)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case does not seem to be treated differently (e.g., issue warning logs) before this PR. Is anything changed in this PR that make this case special? Or you just hope to add a log for this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this behaviour is preexisting to PR. (also it can be a valid behaviour, say when a user specified the metric filter to target a subset of pods, but no such pods existed in the required history window).
Adding warning here just in case when this behaviour is not intentional, so it is easier to uncover a misconfiguration, for example when it could have been handy please see #6221 and #5031 (comment).
a4fd9dd
to
6d0f2d6
Compare
6d0f2d6
to
8d1573a
Compare
@kwiesmueller Could you do a final round of review and approve if it looks good to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits.
vertical-pod-autoscaler/pkg/recommender/input/cluster_feeder.go
Outdated
Show resolved
Hide resolved
vertical-pod-autoscaler/pkg/recommender/input/cluster_feeder.go
Outdated
Show resolved
Hide resolved
…ometheus-history-loading
Hi, Can this be merged in? |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Evedel The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…ometheus-history-loading
39e42f5
to
a301cc7
Compare
Any chance someone can have a look please? |
PR needs rebase. Instructions 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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
It will allow to run VPA explicitly without history initialisation, but also will make it compulsory to initialise history if prometheus is a provider.
Which issue(s) this PR fixes:
Fixes #6050
Special notes for your reviewer:
Please see the bug/issue description detailed in #6050
Does this PR introduce a user-facing change?
No
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
No