-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Allow retention to be set only by size #4590
Allow retention to be set only by size #4590
Conversation
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.
Nice! It would be good to update the description of Retention
.
Default is '24h' if RetentionSize is empty.
prometheus-operator/pkg/apis/monitoring/v1/types.go
Lines 354 to 357 in 961c333
// Time duration Prometheus shall retain data for. Default | |
// is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)` | |
// (milliseconds seconds minutes hours days weeks years). | |
Retention string `json:"retention,omitempty"` |
If retention size is set and retention time is not, default retention time value will not be used. If both retention size and retention time are set, then both values will be used. Fixed prometheus-operator#2883 Signed-off-by: heylongdacoder <heylongdacoder@gmail.com>
bb1c14e
to
324436a
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.
👍
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
Thanks for review :) |
If retention size is set and retention time is not, default retention
time value will not be used. If both retention size and retention time
are set, then both values will be used.
Fixed #2883
Signed-off-by: heylongdacoder heylongdacoder@gmail.com
Description
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Type of change
What type of changes does your code introduce to the Prometheus operator? Put an
x
in the box that apply.CHANGE
(fix or feature that would cause existing functionality to not work as expected)FEATURE
(non-breaking change which adds functionality)BUGFIX
(non-breaking change which fixes an issue)ENHANCEMENT
(non-breaking change which improves existing functionality)NONE
(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.