-
Notifications
You must be signed in to change notification settings - Fork 586
Insights operator API #1237
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
Insights operator API #1237
Conversation
|
Hello @tremes! Some important instructions when contributing to openshift/api: For merging purposes, this repository follows the no-Feature-Freeze process which means that in addition to the standard
OR
Who should apply these qe/docs/px labels?
|
18416fe to
e2b0081
Compare
|
/label docs-approved |
JoelSpeed
left a comment
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.
Please make the adjustments, generate the CRD schema and then test this new API. I'd like to make sure that there's some manual testing to ensure you can set the fields to the appropriate values, eg the expected fields can be omitted, the validations work as expected
| } | ||
|
|
||
| type GatherStatus struct { | ||
| // lastGatherTime is the last time when Insights data gathering finished. |
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.
Do we clear this or change it at all when one is in progress? Did we work out how a user would work out that a gather is in progress? Or are we deferring that til we introduce the job style API later?
We should note what this means when it's empty or zero
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.
No we don't (it can happen that a gathering is interrupted - i.e will not finish [e.g pod restart] and the time will not be set). We didn't (the information is not available now anyway) and yes I would defer this problem to force gather/job design.
So empty or zero means that there hasn't been any data gathering yet and yes let's document it here.
JoelSpeed
left a comment
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.
Couple of small bits but otherwise LGTM. Please test the duration validations work as expected in this case
| Name string `json:"name"` | ||
| // lastGatherDuration represents the time spent gathering. | ||
| // +kubebuilder:validation:Required | ||
| LastGatherDuration metav1.Duration `json:"lastGatherDuration"` |
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.
Validation here too, note no zero this time as its required
| LastGatherDuration metav1.Duration `json:"lastGatherDuration"` | |
| // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" | |
| LastGatherDuration metav1.Duration `json:"lastGatherDuration"` |
e5ad687 to
9345685
Compare
9345685 to
827a49a
Compare
|
/test verify I think that's a flake Otherwise LGTM |
|
/test verify |
|
/label qe-approved |
|
/label px-approved |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, JoelSpeed, tremes The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@tremes: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
This is the first part (with operator status API) and follow-up of #1193 and the original enhancement openshift/enhancements#1037