-
Notifications
You must be signed in to change notification settings - Fork 533
New Insights config API proposal #1037
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
New Insights config API proposal #1037
Conversation
e686191 to
822af17
Compare
bparees
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.
you're going to want feedback from @deads2k on your api specification
|
I updated the confg API proposal to make the API more lightweight. There are still some things to be decided (and then described):
|
i would think you have no choice but to keep it, as you say, for backwards compatible reasons. The real question will be what to do if someone then updates the secret, after you have migrated the content to the new api. Do you re-migrate? do you ignore the change? my inclination would be that as long as the secret exists, it is the source of truth, and if someone wants to fully migrate to the new mechanism, they need to remove the secret/stop editing the secret. but if they create the secret in the future, that becomes the source of truth for the config again. |
| - if all the gatherers are disabled (`disabledGatherers: ["all"]`), nothing happens | ||
| - if there is some gathering in progress (`Status` is "running" in the `GatheringStatus` section) then it will be interrupted and the new gathering will be triggered | ||
| - if there is not any gathering in progress (`Status` is "waiting" in the `GatheringStatus` section) then the new gathering will be triggered almost immediately | ||
| - user can check the `Status` or the `LastGatheringTime` attribute in the `GatheringStatus` section to check if the new gathering already 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.
Same question as above, what happens with ForceGatheringReason field after a successful run?
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.
I compared this with ForceRedeploymentReason in our operators, and they leave it set, so for consistency I'm fine leaving it set. You'll easily know when the field changes to initiate a new run from informers.
| Status corev1.ConditionStatus `json:"status"` | ||
| // Messages is an optional attribute that provides error and warning messages | ||
| // from the gatherer | ||
| Messages []string `json:"messages,omitempty"` |
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.
I didn't notice that earlier, but since each gatherer has its own status GathererStatus, and within that you have an array of conditions GathererConditions you could probably change this Messages array to be just Message string I don't expect that much of data in it, based on my previous experience.
e61d501 to
bf3c541
Compare
soltysh
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.
| // When there is some gathering in the progress then it is interrupted. | ||
| // When all the gatherers are deactivated by the `DisabledGatherers`, nothing happens. | ||
| // When the forced gathering is finished then the value is cleared. | ||
| ForceGatherReason string `json:"forceGatherReason"` |
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.
This seems transient and the rest seem permanent. I'd make two separate values under spect for them.
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.
@deads2k are you referring to forced gathering (transient) and the disablement of gatherers (permanent)? If so, that's already handled separately. This field is only for the former, the latter is done through DisabledGatherers below. Or are you talking about something else?
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.
discussed in slack. Also, this could get worked out in an API PR. It's important, but the fitting impact here is relatively minor
|
|
||
| type DataPolicy string | ||
| ``` | ||
| Note that the `support` secret configuration still takes precedence over the new config API. |
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.
This seems backwards. If someone is using this, the old should be retired and perhaps force-assigned to reflect these values.
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.
If someone is using this, the old should be retired and perhaps force-assigned to reflect these values.
i might not be following what "force reassigned to reflect these values means" (forced in which direction), but fundamentally if someone has config in a secret, that config should take precedence over any default values implied by the introduction of this new api resorce with empty values, no?
and if they have existing tooling that's ignorant of this new api and continues to update the secret, i'd expect those config values to be respected, until such time as we actually remove support for the "secret-based" config api (which, being that it's an api in my mind, we can't do without some sort of deprecation process)
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.
Another point is that the current proposal doesn't provide all the config options available via the support secret so we can't simply deprecate it IMO.
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.
@deads2k based on my understanding after talking with @tremes there is no clear goal yet, to fully replace these config secret, that's why the secret precedence here makes sense. Until there's a clear desire to move out of the config we can switch the priorities, but for now, given only limited set of functionality is supported there I'm ok with this approach.
|
I like the direction of the API to introduce a real operator resource in operator.openshift.io and I suggest starting the implementation there. The API for insights.operator.openshift.io seems close enough to debate finer details in an API PR. |
|
Based on yesterday's discussion, I removed the wording regarding the clearing of the "ForceGatherReason" attribute. The API PR is openshift/api#1193. |
b023316 to
70bbd05
Compare
soltysh
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.
/lgtm
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: soltysh 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 enhancement is proposing a new Insights config API including a way how to trigger the Insights data gathering on demand.