mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 14:34:17 +00:00
Fix the Job build error when BackupReposiotry name longer than 63. (#9350)
* Fix the Job build error when BackupReposiotry name longer than 63. Fix the Job build error. Consider the name length limitation change in job list code. Use hash to replace the GetValidName function. Signed-off-by: Xun Jiang <xun.jiang@broadcom.com> * Use ref_name to replace ref. Signed-off-by: Xun Jiang <xun.jiang@broadcom.com> --------- Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -275,7 +275,7 @@ func (r *BackupRepoReconciler) Reconcile(ctx context.Context, req ctrl.Request)
|
||||
log.WithError(err).Warn("Failed to get keepLatestMaintenanceJobs from ConfigMap, using CLI parameter value")
|
||||
}
|
||||
|
||||
if err := maintenance.DeleteOldJobs(r.Client, req.Name, keepJobs, log); err != nil {
|
||||
if err := maintenance.DeleteOldJobs(r.Client, *backupRepo, keepJobs, log); err != nil {
|
||||
log.WithError(err).Warn("Failed to delete old maintenance jobs")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user