-
Notifications
You must be signed in to change notification settings - Fork 226
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
rollouts: add ready condition to remote root sync #3737
rollouts: add ready condition to remote root sync #3737
Conversation
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.
Thanks for improving this. I have some minor comments.
generationChanged := rrs.Generation == rrs.Status.ObservedGeneration | ||
readyStatusChanged := len(rrs.Status.Conditions) == 0 || rrs.Status.Conditions[0].Type != "Ready" || rrs.Status.Conditions[0].Status != rssReady | ||
|
||
if !generationChanged && !syncStatusChanged && !readyStatusChanged { |
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.
Another way to do this will be: compute the new status and compare the new status with current using reflect.DeepEqual
(that compares the entire struct recursively). That will future proof this code as we evolve the status.
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.
Looking into this. I will need to exclude the Status.Conditions[].LastTransitionTime
field from the comparison as this can vary from the existing status and any status I compute from scratch.
@@ -136,42 +141,81 @@ func (r *RemoteRootSyncReconciler) Reconcile(ctx context.Context, req ctrl.Reque | |||
|
|||
gkeCluster, err := r.store.GetCluster(ctx, cr.Name) | |||
if err != nil { | |||
r.updateStatus(ctx, &remoterootsync, clusterConnectivityFailed, nil) |
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 need to double check the underlying code but just getting the cluster shouldn't require reaching out to the target cluster so connectivityFailure
may not be applicable.
@ChristopherFry Do we want to do anything here or close this out ? |
Closing this pull request in favor of #3849. |
This pull request updates the rollouts proof of concept, adding a ready condition to the remote root sync status. This condition allows us to understand if the remote root sync has connectivity to the target cluster.