Skip to content

Conversation

@tremes
Copy link
Contributor

@tremes tremes commented Feb 21, 2022

This enhancement is proposing a new Insights config API including a way how to trigger the Insights data gathering on demand.

Copy link
Contributor

@bparees bparees left a 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

@tremes tremes changed the title WIP: New Insights config API proposal New Insights config API proposal Feb 24, 2022
@tremes tremes changed the title New Insights config API proposal WIP New Insights config API proposal Mar 10, 2022
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 10, 2022
@tremes
Copy link
Contributor Author

tremes commented Mar 10, 2022

I updated the confg API proposal to make the API more lightweight. There are still some things to be decided (and then described):

  • do we need to introduce unsupportedConfigOverrides field?
  • this is related to the question above, but would it make sense to keep the original support secret way of config available since we will need to keep it for the backward compatible reasons (it's described in the enhancement but there is this option of basic auth for the ingress service, which means to store/config username, password somewhere)

@bparees
Copy link
Contributor

bparees commented Mar 10, 2022

would it make sense to keep the original support secret way of config available since we will need to keep it for the backward compatible reasons

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
Copy link

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?

Copy link

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"`
Copy link

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.

@tremes tremes force-pushed the insights_config branch 2 times, most recently from e61d501 to bf3c541 Compare April 29, 2022 10:34
Copy link

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One final nit, I'll let @deads2k or @mfojtik have final saying

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2022
// 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"`
Copy link
Contributor

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.

Copy link

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?

Copy link
Contributor

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.
Copy link
Contributor

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.

Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link

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.

@deads2k
Copy link
Contributor

deads2k commented Apr 29, 2022

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.

@tremes
Copy link
Contributor Author

tremes commented May 11, 2022

Based on yesterday's discussion, I removed the wording regarding the clearing of the "ForceGatherReason" attribute. The API PR is openshift/api#1193.

@tremes tremes force-pushed the insights_config branch 2 times, most recently from b023316 to 70bbd05 Compare May 13, 2022 10:54
@tremes tremes force-pushed the insights_config branch from 6a5c92c to 99010ee Compare May 27, 2022 11:23
Copy link

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 27, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 27, 2022

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 27, 2022

@tremes: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@openshift-merge-robot openshift-merge-robot merged commit 9ca5e18 into openshift:master May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants