-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add Updated Conditon in Status #546
Conversation
@YZ775 |
a21f064
to
60e7997
Compare
Please add documentation for this feature to reconcile.md. |
1e924b7
to
cb5e6f7
Compare
log := crlog.FromContext(ctx) | ||
orig := cluster.DeepCopy() | ||
|
||
if cluster.Status.ReconcileInfo.Generation != cluster.Generation { |
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 if statement is unnecessary.
Currently, we use DeepEqual()
to determine whether or not an update is required.
…Condition Signed-off-by: YZ775 <[email protected]> add envtest Signed-off-by: YZ775 <[email protected]> update gomod Signed-off-by: YZ775 <[email protected]> update envtest and add e2e Signed-off-by: YZ775 <[email protected]> update apidoc Signed-off-by: YZ775 <[email protected]> rename Signed-off-by: YZ775 <[email protected]> add ObservedGeneration and add partition handling, and update e2e test Signed-off-by: YZ775 <[email protected]> remove unnecessary ObservedGeneration and move updateStatus() after reconcileV1StatefulSet() , and update e2e test Signed-off-by: YZ775 <[email protected]> add document about UpToDate Signed-off-by: YZ775 <[email protected]> update against review Signed-off-by: YZ775 <[email protected]> wip change status to StatefulSetReady and add ReconcileSuccess, and fix unstable test Signed-off-by: YZ775 <[email protected]> remove unnecessary condition check Signed-off-by: YZ775 <[email protected]> remove redundant assignments in updateStatusByStatefulSet Signed-off-by: YZ775 <[email protected]> move updateReconcileStatus in reconcileV1 Signed-off-by: YZ775 <[email protected]> fix controller test Signed-off-by: YZ775 <[email protected]> update documents Signed-off-by: YZ775 <[email protected]> update lifecycle_test.go to check StatefulSetReady condition Signed-off-by: YZ775 <[email protected]> fix auto generated document Signed-off-by: YZ775 <[email protected]> join update status funcion Signed-off-by: YZ775 <[email protected]> revert Eventually in envtest Signed-off-by: YZ775 <[email protected]> fix multiple Update() call Signed-off-by: YZ775 <[email protected]> update docs Signed-off-by: YZ775 <[email protected]> fix controller Signed-off-by: YZ775 <[email protected]> update condition when sts not found Signed-off-by: YZ775 <[email protected]> update test Signed-off-by: YZ775 <[email protected]> update lifecycle_test.go Signed-off-by: YZ775 <[email protected]> fix condition Signed-off-by: YZ775 <[email protected]> fix generation check and err handling Signed-off-by: YZ775 <[email protected]> do not show err log when deletion of cluster Signed-off-by: YZ775 <[email protected]> add StatefulSet condition and change MySQLClusterCondition to metav1.Condition Signed-off-by: YZ775 <[email protected]>
482edb0
to
b7d6985
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. Thank you!
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
The health status in
MySQLCluster.Status.Condition
will be true even if all StatefulSet is not ready when updating MySQLCluster.So if we use this status as a health check in ArgoCD, they proceed next wave in spite of the update of MySQLCluster is not finished.
As a solution to this problem, I added
ConditionUpdated
Condition inMySQLCluster.Status.Condition
.This condition will become true when an update of Statefulset is finished.
This PR contains following improvement
metav1.Condition
instead ofMySQLClusterCondition