From 0aa3c263b482b83fedd09ced08d7f56e5d32ba51 Mon Sep 17 00:00:00 2001 From: "David L. Smith-Uchida" Date: Tue, 1 Jun 2021 23:25:19 -0700 Subject: [PATCH] Added BackupPhaseUploading and BackupPhaseUploadingPartialFailure backup (#3805) phases as part of Upload Progress Monitoring, fixes #3755 Add backup phases needed for Upload Progress Monitoring Signed-off-by: Dave Smith-Uchida --- changelogs/unreleased/3805-dsmithuchida | 16 ++++++++++++++++ pkg/apis/velero/v1/backup.go | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 changelogs/unreleased/3805-dsmithuchida diff --git a/changelogs/unreleased/3805-dsmithuchida b/changelogs/unreleased/3805-dsmithuchida new file mode 100644 index 000000000..e94787c80 --- /dev/null +++ b/changelogs/unreleased/3805-dsmithuchida @@ -0,0 +1,16 @@ +Added BackupPhaseUploading and BackupPhaseUploadingPartialFailure backup phases as part of Upload Progress Monitoring + +Uploading (new) +The "Uploading" phase signifies that the main part of the backup, including +snapshotting has completed successfully and uploading is continuing. In +the event of an error during uploading, the phase will change to +UploadingPartialFailure. On success, the phase changes to Completed. The +backup cannot be restored from when it is in the Uploading state. + +UploadingPartialFailure (new) +The "UploadingPartialFailure" phase signifies that the main part of the backup, +including snapshotting has completed, but there were partial failures either +during the main part or during the uploading. The backup cannot be restored +from when it is in the UploadingPartialFailure state. + + diff --git a/pkg/apis/velero/v1/backup.go b/pkg/apis/velero/v1/backup.go index ba00c0754..c7325a3ef 100644 --- a/pkg/apis/velero/v1/backup.go +++ b/pkg/apis/velero/v1/backup.go @@ -207,6 +207,17 @@ const ( // BackupPhaseInProgress means the backup is currently executing. BackupPhaseInProgress BackupPhase = "InProgress" + // BackupPhaseUploading means the backups of Kubernetes resources + // and creation of snapshots was successful and snapshot data + // is currently uploading. The backup is not usable yet. + BackupPhaseUploading BackupPhase = "Uploading" + + // BackupPhaseUploadingPartialFailure means the backup of Kubernetes + // resources and creation of snapshots partially failed (final phase + // will be PartiallyFailed) and snapshot data is currently uploading. + // The backup is not usable yet. + BackupPhaseUploadingPartialFailure BackupPhase = "UploadingPartialFailure" + // BackupPhaseCompleted means the backup has run successfully without // errors. BackupPhaseCompleted BackupPhase = "Completed"