Skip to content

Commit

Permalink
Merge pull request #7745 from qiuming-best/maintenance-job-fix
Browse files Browse the repository at this point in the history
[v1.14 test] Fix maintenance job launched immediately after prune error
  • Loading branch information
qiuming-best authored Apr 29, 2024
2 parents a798182 + 5eae542 commit 8f78aaa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions pkg/cmd/cli/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,6 @@ func NewInstallOptions() *Options {
DefaultSnapshotMoveData: false,
DisableInformerCache: false,
ScheduleSkipImmediately: false,
MaintenanceCfg: repository.MaintenanceConfig{
KeepLatestMaitenanceJobs: repository.DefaultKeepLatestMaitenanceJobs,
},
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/backup_repository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 8f78aaa

Please sign in to comment.