-
Notifications
You must be signed in to change notification settings - Fork 398
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
reconciler/apiexport: don't klog.Fatal #1291
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.
/lgtm
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 make it a bit more clear to the future reader in comments how the logic about reconcilation works (in case of programming error objectmeta/spec change will be patched first, in the next iteration the status change).
@@ -322,10 +323,6 @@ func (c *controller) patchIfNeeded(ctx context.Context, old, obj *apisv1alpha1.A | |||
specOrObjectMetaChanged := !equality.Semantic.DeepEqual(old.Spec, obj.Spec) || !equality.Semantic.DeepEqual(old.ObjectMeta, obj.ObjectMeta) | |||
statusChanged := !equality.Semantic.DeepEqual(old.Status, obj.Status) | |||
|
|||
if specOrObjectMetaChanged && statusChanged { |
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 put as a comment on the inner apiExportForPatch
declaration that the logic will guarantee that only the objectmeta/spec change will be patched first and on the next iteration the spec change.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixed old code that exits the process.