Fix maintenance job launched immediately after prune error
Signed-off-by: Ming Qiu <ming.qiu@broadcom.com>pull/7745/head
parent
159a49f0b2
commit
5eae542762
|
@ -164,9 +164,6 @@ func NewInstallOptions() *Options {
|
|||
DefaultSnapshotMoveData: false,
|
||||
DisableInformerCache: false,
|
||||
ScheduleSkipImmediately: false,
|
||||
MaintenanceCfg: repository.MaintenanceConfig{
|
||||
KeepLatestMaitenanceJobs: repository.DefaultKeepLatestMaitenanceJobs,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ func (r *BackupRepoReconciler) SetupWithManager(mgr ctrl.Manager) error {
|
|||
s := kube.NewPeriodicalEnqueueSource(r.logger, mgr.GetClient(), &velerov1api.BackupRepositoryList{}, repoSyncPeriod, kube.PeriodicalEnqueueSourceOption{})
|
||||
|
||||
return ctrl.NewControllerManagedBy(mgr).
|
||||
For(&velerov1api.BackupRepository{}).
|
||||
For(&velerov1api.BackupRepository{}, builder.WithPredicates(kube.SpecChangePredicate{})).
|
||||
WatchesRawSource(s, nil).
|
||||
Watches(&velerov1api.BackupStorageLocation{}, kube.EnqueueRequestsFromMapUpdateFunc(r.invalidateBackupReposForBSL),
|
||||
builder.WithPredicates(
|
||||
|
|
Loading…
Reference in New Issue