-
Notifications
You must be signed in to change notification settings - Fork 158
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
Improve conditions reporting #1605
base: main
Are you sure you want to change the base?
Improve conditions reporting #1605
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
71d7b21
to
128b55c
Compare
Description
Important
This PR is mainly intended to gather feedback on some work and decide how to move forward.
This work was intended to implement RHOAIENG-18216, so to make reconciliation errors be visible also in the status sub-resource of the various CRs, however it ended up being a larger chunk of work. In case we decide to move forward with this approach, the PR must be split in smaller, incremental PRs.
I did a little bit of research on how conditions are reported by other operator and I ended up taking a lot of inspiration from how the Knative operators are handling with conditions, so:
So now, for every API that is implemented with the reconciler framework, we now have at least two conditions:
Ready
which report the overall status of the resourceProvisioningSucceeded
which reports any error eventually happening during the reconciliationIf any component has additional conditions, then it can declare them (if not all the conditions will be taken into account).
So as an example, in the
ModelRegistry
component I now have:Which results in having its status populated with the following conditions:
An the ready condition is reported a failing, because the
DeploymentsAvailable
conditions is not satisfied.The
DataScienceCluster
has also been refactored to use the reconciler framework and as consequence behave the same, so it has a top levelReady
condition, aProvisioningSucceeded
one, and a dedicatedComponentsReady
condition that reports the overall status of the provisioned components (individual components conditions are still reported).Note
in this case the
Ready
condition is reported as being satisfied, even if theComponentsReady
is not. This is because theseverity
is marked asInfo
(the default isError
and it is being represented by an empty value)This
severity
field can be useful to report some specific states, so as an example, theKserve
component would report theReady
condition as true, even ifServerlessAvailable
andServiceMeshAvailable
are not (in this case because the component is configured explicitly to not use serverless)Important
As part of this work, some other changes have been made:
DataScienceReconciler
to use the reconciler frameworksgc
action to offer more configurable options and usable also to remove non managed componentslastHeartBeatTime
from DSC's conditionsHow Has This Been Tested?
Screenshot or short clip
Merge criteria
Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).The developer has manually tested the changes and verified that the changes work