-
Notifications
You must be signed in to change notification settings - Fork 32
K8SPS-498: remove unnecessary status updates #1102
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
base: main
Are you sure you want to change the base?
Conversation
if err := r.Get(ctx, client.ObjectKeyFromObject(cr), cr); err != nil { | ||
return errors.Wrap(err, "get cluster") | ||
} |
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 will overwrite anything we assign to status fields in Reconcile function, right?
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.
Yes, but it shouldn't cause any issues since we overwrite each field of the status in the reconcileCRStatus
method
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 am not sure if it's okay, users test failure might be caused by this
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.
seems fine, also tested it locally and I don't see the init spam of k get ps -w
commit: 3017821 |
https://perconadev.atlassian.net/browse/K8SPS-498
DESCRIPTION
Problem:
While the cluster is initializing, the cluster's
resourceVersion
is constantly updated.Cause:
This happens because status conditions are continuously updated with an incorrect
latestTransitionTime
. ThereconcileCRStatus
method is used in multiple places in the reconcile loop, and whenever it is called, it updates the status conditions with an outdated/incorrectlatestTransitionTime
, based on the cluster passed to the method.Solution:
Always fetch the latest cluster in the
reconcileCRStatus
method.Note for developers: I removed
LatestTransitionTime
from the condition objects because it is already managed by themeta.SetStatusCondition
functionCHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
Config/Logging/Testability