-
Notifications
You must be signed in to change notification settings - Fork 330
cluster: support retention by size for prometheus #2612
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
| func getRetention(retention string) string { | ||
| func getRetentionSize(retention string) string { | ||
| retention = strings.ToUpper(strings.TrimSpace(retention)) | ||
| valid, _ := regexp.MatchString("^[1-9]\\d*(B|KB|MB|GB|TB|PB|EB)$", retention) |
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.
What about KiB etc?
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.
Didn't see that in Prometheus doc though...
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.
Then this should be fine.
|
@dveeden: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: 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. |
6120bc5 to
b2b2026
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2612 +/- ##
==========================================
+ Coverage 41.39% 41.46% +0.07%
==========================================
Files 363 363
Lines 37182 37198 +16
==========================================
+ Hits 15391 15424 +33
+ Misses 19898 19871 -27
- Partials 1893 1903 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
Add support of retention by size for Prometheus. Default value is empty to keep former behavior unchanged. The
storage.tsdb.retention.sizeandstorage.tsdb.retention.timecan be set together.See Prometheus doc for details.
Also close #2058
Check List
Tests
Code changes
Side effects
Related changes
Release notes: