mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-04-21 00:00:33 +00:00
set backup start timestamp before patching to inprogress (#1330)
Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
1
changelogs/unreleased/1330-skriss
Normal file
1
changelogs/unreleased/1330-skriss
Normal file
@@ -0,0 +1 @@
|
||||
set backup's start timestamp before patching it to InProgress so start times display in `velero backup get` while in progress
|
||||
@@ -175,6 +175,7 @@ func (c *backupController) processBackup(key string) error {
|
||||
request.Status.Phase = velerov1api.BackupPhaseFailedValidation
|
||||
} else {
|
||||
request.Status.Phase = velerov1api.BackupPhaseInProgress
|
||||
request.Status.StartTimestamp.Time = c.clock.Now()
|
||||
}
|
||||
|
||||
// update status
|
||||
@@ -390,7 +391,6 @@ func (c *backupController) validateAndGetSnapshotLocations(backup *velerov1api.B
|
||||
func (c *backupController) runBackup(backup *pkgbackup.Request) error {
|
||||
log := c.logger.WithField("backup", kubeutil.NamespaceAndName(backup))
|
||||
log.Info("Starting backup")
|
||||
backup.Status.StartTimestamp.Time = c.clock.Now()
|
||||
|
||||
logFile, err := ioutil.TempFile("", "")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user