Skip to content

Commit 5050084

Browse files
committed
Remove Certificate secret cleanup on service deletion
If users want their Certificate secrets to be cleaned up on certificate deletion, they should configure their cert-manager instance to run with `--enable-certificate-owner-ref`.
1 parent 240754a commit 5050084

File tree

3 files changed

+1
-98
lines changed

3 files changed

+1
-98
lines changed

certs/delete.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

certs/delete_test.go

Lines changed: 0 additions & 60 deletions
This file was deleted.

controllers/service_controller.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,7 @@ func (r *ServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
6363
}, &svc)
6464
if err != nil {
6565
if errors.IsNotFound(err) {
66-
// DeleteSecret is a noop if no secret labeled with
67-
// the deleted service's name is found.
68-
if err := certs.DeleteSecret(ctx, l, r.Client, req); err != nil {
69-
return ctrl.Result{}, err
70-
}
66+
// Service got deleted, we don't need to do anything
7167
return ctrl.Result{}, nil
7268
}
7369

0 commit comments

Comments
 (0)