mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 06:54:32 +00:00
BackupRepositories associated with a BSL are invalidated when BSL is (re-)created. (#7380)
* Add BackupRepositories invalidation on BSL Create Simplify comments Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> * Simplify Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> --------- Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
This commit is contained in:
@@ -26,10 +26,8 @@ import (
|
||||
|
||||
type MapUpdateFunc func(client.Object) []reconcile.Request
|
||||
|
||||
// EnqueueRequestsFromMapUpdateFunc is for the same purpose with EnqueueRequestsFromMapFunc.
|
||||
// Merely, it is more friendly to updating the mapped objects in the MapUpdateFunc, because
|
||||
// on Update event, MapUpdateFunc is called for only once with the new object, so if MapUpdateFunc
|
||||
// does some update to the mapped objects, the update is done for once
|
||||
// EnqueueRequestsFromMapUpdateFunc has the same purpose with handler.EnqueueRequestsFromMapFunc.
|
||||
// MapUpdateFunc is simpler on Update event because mapAndEnqueue is called once with the new object. EnqueueRequestsFromMapFunc is called twice with the old and new object.
|
||||
func EnqueueRequestsFromMapUpdateFunc(fn MapUpdateFunc) handler.EventHandler {
|
||||
return &enqueueRequestsFromMapFunc{
|
||||
toRequests: fn,
|
||||
|
||||
Reference in New Issue
Block a user