Merge pull request #895 from fluxcd/delete-cache-entries
Delete cache entries on object deletion
This commit is contained in:
commit
e9ed331572
|
@ -520,6 +520,9 @@ func (r *ImageUpdateAutomationReconciler) reconcileDelete(obj *imagev1.ImageUpda
|
||||||
// Remove our finalizer from the list.
|
// Remove our finalizer from the list.
|
||||||
controllerutil.RemoveFinalizer(obj, imagev1.ImageUpdateAutomationFinalizer)
|
controllerutil.RemoveFinalizer(obj, imagev1.ImageUpdateAutomationFinalizer)
|
||||||
|
|
||||||
|
// Cleanup caches.
|
||||||
|
r.tokenCache.DeleteEventsForObject(imagev1.ImageUpdateAutomationKind, obj.GetName(), obj.GetNamespace())
|
||||||
|
|
||||||
// Stop reconciliation as the object is being deleted.
|
// Stop reconciliation as the object is being deleted.
|
||||||
return ctrl.Result{}, nil
|
return ctrl.Result{}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue