-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add conditions to status subresource on CRs #86
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
Conversation
ae69eb7
to
e19e24a
Compare
api/v1alpha1/condition_types.go
Outdated
|
||
const ( | ||
ReadyCondition ConditionType = "Ready" | ||
ImageResourceFound ConditionType = "ImageResourceFound" |
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.
From a pool-perspective the following conditions (with state False
, True
and Unknown
) make sense:
-
ImageReference
False
if the referenced image doesn't existTrue
if the referenced image exist
Reason/Message
: whatever we have by hand :-) -
PoolReady
False
if the pool exist in garm but pool-manager is falseTrue
if pool-manager is ready
Reason/Message
: whatever we have by hand from garm-response - e.g theLastSyncError
string? -
ScopeReference
(in the future)
if we want to decouple the scopereference in the poolCR (by removing the validation) - to make cr-creation idempotent
59e32c4
to
632271b
Compare
632271b
to
e62d970
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.
the conditions itself are looking fine. +1 for that.
we should "batch" all the changes and do r.Status().Update(...
at the end of the reconciliation loop. On the mid-term we should move to patches and with that we do not change the CRs that often if nothing has changed.
otherwise we are doing tons of updates which means, every CR will get added to the reconcile loop immediately ( we had the same/similar issue when we've set the last-reconcile timestamp in the status)
fff080d
to
9950d97
Compare
Adds []metav1.Condition property to the status subresource of pools, enterprise, org and repo
TODO: