-
Notifications
You must be signed in to change notification settings - Fork 779
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
Remove the sync finalizer #369
Remove the sync finalizer #369
Conversation
945e2df
to
39ba9db
Compare
Fixes open-policy-agent#352. Removes the sync finalizer on objects that have been cached, and the various bits of logic around keeping track of what objects have finalizers and removing them on shutdown etc. Signed-off-by: Jack Kleeman <jackkleeman@gmail.com>
39ba9db
to
bc2ad08
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.
Thank you for taking care of this! A couple of changes needed.
Apologies if there is a slow review cycle this week, as I'm on vacation.
@@ -153,7 +156,6 @@ func (r *ReconcileConfig) Reconcile(request reconcile.Request) (reconcile.Result | |||
} | |||
|
|||
newSyncOnly := newSet() | |||
toClean := newSet() | |||
if instance.GetDeletionTimestamp().IsZero() { | |||
if !hasFinalizer(instance) { | |||
instance.SetFinalizers(append(instance.GetFinalizers(), finalizerName)) |
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.
We can remove this finalizer too. Let's leave that for a follow-on PR in the interest of incremental changes.
1c2eed6
to
307e5b5
Compare
Signed-off-by: Jack Kleeman <jackkleeman@gmail.com>
307e5b5
to
25c6fa6
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
Fixes #352. Removes the sync finalizer on objects that have been cached,
and the various bits of logic around keeping track of what objects have
finalizers and removing them on shutdown etc.