-
Notifications
You must be signed in to change notification settings - Fork 98
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
Progressive status helper and in-progress status checker #422
Conversation
fa89d27
to
3f943b7
Compare
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
Thanks @darkowlzz 🏅
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
Great stuff @darkowlzz! 🙇
3f943b7
to
c007d73
Compare
0e24dd3
to
4aa0603
Compare
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.
Other than the two minor commented nits, this looks good to me.
Add a progressive status helper for setting the Reconciling and Ready conditions in the middle of reconciliation with consideration for drift detection. Signed-off-by: Sunny <darkowlzz@protonmail.com>
InProgressChecker is a variant of the status conditions checker with a different set of checks that are applicable to the objects in the middle of on-going reconciliation, with intermediate conditions. Delete invalid check FAIL0010. Add FAIL0011 for mid-reconciliation scenario. Signed-off-by: Sunny <darkowlzz@protonmail.com>
4aa0603
to
7962d2a
Compare
This change introduces a helper and a checker for progressive status of objects that are undergoing reconciliation. Progressive status are the status conditions that appear on an object in the middle of a reconciliation, also referred as mid-reconciliation status in this change.
Reconciling
andReady
are primarily involved in progressive status to indicate that an object is undergoing reconciliation.Reconciling=True
andReady=Unknown
are expected on the object.Ready=True
set by a previous reconciliation, theReconciling=True
withReady=True
indicates that the reconciler is reconciling an object but hasn't detected any drift to act upon.Ready=Unknown
indicates that there may be some drift for which the reconciler is performing some action.ProgressiveStatus helper
For working with the above scenarios of progressive status, a helper
ProgressiveStatus(drift, obj, reason, msg, msgArgs...)
is introduced. It helps mark an objectReconciling=True
and alsoReady=Unknown
with the same reason and message if a drift is detected. If no drift is detected, onlyReconciling=True
is set.In-progress status checker
The progressive status conditions of an object are observed to be orthogonal to the final status of the object after a full reconciliation that's computed by various status summarization techniques. During a reconciliation, there's not enough information to perform full summarization of the status conditions. The partial information is sufficient to only report the current status of reconciliation in the form of progressive status. This results in differences in the considerations of status conditions check on an object. Due to this, the WARN and FAIL checks of the status checker have been updated to indicate if they apply to mid-reconciliation status or not. And a new check is added that's specific to mid-reconciliation status.
Due to the different sets of checks, a new in-progress status checker is introduced, which can be created with
NewInProgressChecker()
. With this, we have two separate status checkers which can be used to check the progressive status and fully reconciled status of an object.Fixes #380