-
Notifications
You must be signed in to change notification settings - Fork 0
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
External changes on several failed updates for all clusters #689
Conversation
controllers/clusters/helpers.go
Outdated
resource.GetAnnotations()[models.ExternalChangesAnnotation] = "" | ||
resource.GetAnnotations()[models.ResourceStateAnnotation] = models.UpdatedEvent | ||
|
||
fmt.Println("resource.GetAnnotations()[models.ResourceStateAnnotation] ", resource.GetAnnotations()[models.ResourceStateAnnotation]) |
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.
Please delete this log
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.
fixed
controllers/clusters/helpers.go
Outdated
|
||
fmt.Println("resource.GetAnnotations()[models.ResourceStateAnnotation] ", resource.GetAnnotations()[models.ResourceStateAnnotation]) | ||
|
||
l.Info("External changes have been reconciled", "resource ID", resource.GetClusterID()) |
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 think resource ID
-> cluster ID
is more suitable
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.
fixed
ef54408
to
dacb39d
Compare
@@ -247,6 +246,12 @@ func (r *ZookeeperReconciler) handleUpdateCluster( | |||
return reconcile.Result{}, err | |||
} | |||
|
|||
if zook.Annotations[models.ExternalChangesAnnotation] == models.True || | |||
r.RateLimiter.NumRequeues(req) == rlimiter.DefaultMaxTries || | |||
!zook.Spec.IsEqual(iZook.Spec) { |
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.
Let's remove !zook.Spec.IsEqual(iZook.Spec)
check, cause we checked this case inside the handleExternalChanges
func
Refactor the codebase by eliminating the
UpdateQueuedAnnotation
annotation and unnecessary redundancy in handling external changes. This PR enhances code clarity and readability, resulting in a cleaner implementation. Now the operator handles InstAPI Update errors - after several errors, the operator returns external changes and blocks the update operation