cluster: support retention by size for prometheus#2612
cluster: support retention by size for prometheus#2612AstroProfundis wants to merge 2 commits intopingcap:masterfrom
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.
Didn't see that in Prometheus doc though...
|
@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: