Skip to content

Commit

Permalink
remove delete all of from handleDeletion
Browse files Browse the repository at this point in the history
  • Loading branch information
jaireddjawed committed Feb 12, 2025
1 parent 0da8649 commit c7bd671
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions controllers/hcpvaultsecretsapp_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,6 @@ func (r *HCPVaultSecretsAppReconciler) handleDeletion(ctx context.Context, o *se
return fmt.Errorf("failed to list secrets in namespace %s: %w", o.GetNamespace(), err)
}
removeFinalizers(ctx, r.Client, logger, &secrets)
if err := r.DeleteAllOf(ctx, &secretsv1beta1.VaultDynamicSecret{},
client.InNamespace(common.OperatorNamespace),
client.MatchingLabels{helpers.LabelOwnerRefUID: string(o.GetUID())}); err != nil {
return fmt.Errorf("failed to delete secrets in namespace %s: %w", o.GetNamespace(), err)
}
// then remove the finalizer from the HCPVaultSecretsApp and delete it
if controllerutil.ContainsFinalizer(o, hcpVaultSecretsAppFinalizer) {
logger.Info("Removing finalizer")
Expand Down

0 comments on commit c7bd671

Please sign in to comment.