-
Notifications
You must be signed in to change notification settings - Fork 368
MON-2193: pkg/manifests: Expose retention size settings for Platform Prometheus #1579
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
MON-2193: pkg/manifests: Expose retention size settings for Platform Prometheus #1579
Conversation
/skip |
d79216b
to
5d0a75c
Compare
/retest |
2 similar comments
/retest |
/retest |
@philipgough @simonpasquier Please review when you get a chance |
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
/retest-required Please review the full test history for this PR and help us cut down flakes. |
cc: @openshift/team-monitoring-qe-approvers |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/skip |
/retest-required |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
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.
Eventually CMO should run more validations on the user inputs to avoid pushing bad configuration but it's something that we should address globally so I'm mostly fine with this PR.
Once we add validating webhook in Prometheus operator for the fields it should be enough? Or should we add validations for user inputs on top of it? |
Thank you :), I have updated the test |
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
I think string comparison == ""
or " != ""` should make use of Trim(). Applicable also when you set it.
RetentionSize = strings.Trim(config.RetentionSize)
Good suggestion, I will update :) |
Also we have other fields as well which will be good to use trim, can do that in separate PR? |
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
@sthaha suggestion would make sense but IMHO it should be addressed consistently since it affects not only retention settings. As such I'm fine with the PR as it is and we can have a follow-up ticket to track the suggested improvement.
Introduce a new "retentionSize" field under the prometheusK8s key When neither retention nor retentionSize are defined, a default of 15d for time retention applies. When "retentionSize" is defined and "retention" isn't, only size retention applies. When "retentionSize" isn't defined and "retention" is, only time retention applies When both time and size retention fields are defined, both apply. Signed-off-by: Jayapriya Pai <[email protected]>
/hold cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: PhilipGough, simonpasquier, slashpai, sthaha The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
@slashpai: all tests passed! Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
MON-2216: Expose retention size settings for Platform Prometheus in the CMO configuration
Introduce a new "retentionSize" field under the prometheusK8s key
When neither retention nor retentionSize are defined, a default of 15d for time retention applies.
When "retentionSize" is defined and "retention" isn't, only size retention applies.
When "retentionSize" isn't defined and "retention" is, only time retention applies
When both time and size retention fields are defined, both apply.
Signed-off-by: Jayapriya Pai [email protected]