external-secrets / external-secrets

External Secrets Operator reads information from a third-party service like AWS Secrets Manager and automatically injects the values as Kubernetes Secrets.
https://external-secrets.io/main
Apache License 2.0
4.11k stars 749 forks source link

Adds codepath for removing finalizers #3610

Closed lllamnyp closed 1 week ago

lllamnyp commented 1 week ago

See #3609.

Problem Statement

A PushSecret created with DeletionPolicy==Delete and later updated with DeletionPolicy==None has no codepath to remove its finalizers.

Related Issue

Fixes #3609

Proposed Changes

Populate case DeletionPolicyNone: with an unconditional removal of the finalizer.

Checklist

moolen commented 1 week ago

Change LGTM, thanks for taking care of that! Could you please add a test case for this?

lllamnyp commented 1 week ago

Change LGTM, thanks for taking care of that! Could you please add a test case for this?

I'll do my best to come up with one in a day or two. Should be a simple enough adaption of syncAndDeleteSuccessfully.

lllamnyp commented 1 week ago

Change LGTM, thanks for taking care of that! Could you please add a test case for this?

I've added a test and completed the checklist. Please check it out.

moolen commented 1 week ago

/ok-to-test sha=cf60907