Skip to content

Commit

Permalink
improve Vulnerability Report Reconciler
Browse files Browse the repository at this point in the history
  • Loading branch information
zreigz committed Dec 16, 2024
1 parent 46ff759 commit 9435333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/vulnerabilityreports_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (r *VulnerabilityReportReconciler) Reconcile(ctx context.Context, req ctrl.
}

if !vulnerabilityReport.DeletionTimestamp.IsZero() {
r.reports.Remove(req.NamespacedName.String())
return ctrl.Result{}, nil
}

Expand Down Expand Up @@ -203,7 +204,6 @@ func (r *VulnerabilityReportReconciler) SetupWithManager(mgr ctrl.Manager) error
logger.Error(err, "unable to upsert vulnerability reports")
} else {
logger.Info("upsert vulnerability reports")
r.reports.Clear()
}
}
return false, nil
Expand Down

0 comments on commit 9435333

Please sign in to comment.