From 447a5732a7047a6e3c88862f62f1be5b12a1c388 Mon Sep 17 00:00:00 2001 From: Mateus Oliveira Date: Fri, 28 Feb 2025 10:26:39 -0300 Subject: [PATCH 1/2] fix: Show backup/restore progress in NAB/NAR status Signed-off-by: Mateus Oliveira --- .../oadp-operator.clusterserviceversion.yaml | 32 +++++++++ .../oadp.openshift.io_nonadminbackups.yaml | 66 +++++++++++++++++++ .../oadp.openshift.io_nonadminrestores.yaml | 66 +++++++++++++++++++ .../oadp.openshift.io_nonadminbackups.yaml | 66 +++++++++++++++++++ .../oadp.openshift.io_nonadminrestores.yaml | 66 +++++++++++++++++++ config/non-admin-controller_rbac/role.yaml | 32 +++++++++ 6 files changed, 328 insertions(+) diff --git a/bundle/manifests/oadp-operator.clusterserviceversion.yaml b/bundle/manifests/oadp-operator.clusterserviceversion.yaml index 5a9d17a9c2..e5b2670f84 100644 --- a/bundle/manifests/oadp-operator.clusterserviceversion.yaml +++ b/bundle/manifests/oadp-operator.clusterserviceversion.yaml @@ -843,6 +843,22 @@ spec: - get - patch - update + - apiGroups: + - velero.io + resources: + - datadownloads + verbs: + - get + - list + - watch + - apiGroups: + - velero.io + resources: + - datauploads + verbs: + - get + - list + - watch - apiGroups: - velero.io resources: @@ -855,6 +871,22 @@ spec: - patch - update - watch + - apiGroups: + - velero.io + resources: + - podvolumebackups + verbs: + - get + - list + - watch + - apiGroups: + - velero.io + resources: + - podvolumerestores + verbs: + - get + - list + - watch - apiGroups: - velero.io resources: diff --git a/bundle/manifests/oadp.openshift.io_nonadminbackups.yaml b/bundle/manifests/oadp.openshift.io_nonadminbackups.yaml index d0150c88c9..c2a721bd7e 100644 --- a/bundle/manifests/oadp.openshift.io_nonadminbackups.yaml +++ b/bundle/manifests/oadp.openshift.io_nonadminbackups.yaml @@ -601,6 +601,72 @@ spec: - type type: object type: array + dataMoverVolumeBackups: + description: DataMoverVolumeBackups contains information of the related + Velero DataUpload objects. + properties: + accepted: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Accepted + type: integer + canceled: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Canceled + type: integer + canceling: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Canceling + type: integer + completed: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Completed + type: integer + failed: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Failed + type: integer + inProgress: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase InProgress + type: integer + new: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase New + type: integer + prepared: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Prepared + type: integer + total: + description: number of DataUploads related to this NonAdminBackup's + Backup + type: integer + type: object + fileSystemVolumeBackups: + description: FileSystemVolumeBackups contains information of the related + Velero PodVolumeBackup objects. + properties: + completed: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup in phase Completed + type: integer + failed: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup in phase Failed + type: integer + inProgress: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup in phase InProgress + type: integer + new: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup in phase New + type: integer + total: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup + type: integer + type: object phase: description: phase is a simple one high-level summary of the lifecycle of an NonAdminBackup. diff --git a/bundle/manifests/oadp.openshift.io_nonadminrestores.yaml b/bundle/manifests/oadp.openshift.io_nonadminrestores.yaml index 9102c600c5..3375ddcd50 100644 --- a/bundle/manifests/oadp.openshift.io_nonadminrestores.yaml +++ b/bundle/manifests/oadp.openshift.io_nonadminrestores.yaml @@ -534,6 +534,72 @@ spec: - type type: object type: array + dataMoverVolumeRestores: + description: DataMoverVolumeRestores contains information of the related + Velero DataDownload objects. + properties: + accepted: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Accepted + type: integer + canceled: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Canceled + type: integer + canceling: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Canceling + type: integer + completed: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Completed + type: integer + failed: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Failed + type: integer + inProgress: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase InProgress + type: integer + new: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase New + type: integer + prepared: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Prepared + type: integer + total: + description: number of DataDownloads related to this NonAdminRestore's + Restore + type: integer + type: object + fileSystemVolumeRestores: + description: FileSystemVolumeRestores contains information of the + related Velero PodVolumeRestore objects. + properties: + completed: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore in phase Completed + type: integer + failed: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore in phase Failed + type: integer + inProgress: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore in phase InProgress + type: integer + new: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore in phase New + type: integer + total: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore + type: integer + type: object phase: description: phase is a simple one high-level summary of the lifecycle of an NonAdminRestore. diff --git a/config/crd/bases/oadp.openshift.io_nonadminbackups.yaml b/config/crd/bases/oadp.openshift.io_nonadminbackups.yaml index b1c66fc660..d1eae9750e 100644 --- a/config/crd/bases/oadp.openshift.io_nonadminbackups.yaml +++ b/config/crd/bases/oadp.openshift.io_nonadminbackups.yaml @@ -601,6 +601,72 @@ spec: - type type: object type: array + dataMoverVolumeBackups: + description: DataMoverVolumeBackups contains information of the related + Velero DataUpload objects. + properties: + accepted: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Accepted + type: integer + canceled: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Canceled + type: integer + canceling: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Canceling + type: integer + completed: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Completed + type: integer + failed: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Failed + type: integer + inProgress: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase InProgress + type: integer + new: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase New + type: integer + prepared: + description: number of DataUploads related to this NonAdminBackup's + Backup in phase Prepared + type: integer + total: + description: number of DataUploads related to this NonAdminBackup's + Backup + type: integer + type: object + fileSystemVolumeBackups: + description: FileSystemVolumeBackups contains information of the related + Velero PodVolumeBackup objects. + properties: + completed: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup in phase Completed + type: integer + failed: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup in phase Failed + type: integer + inProgress: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup in phase InProgress + type: integer + new: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup in phase New + type: integer + total: + description: number of PodVolumeBackups related to this NonAdminBackup's + Backup + type: integer + type: object phase: description: phase is a simple one high-level summary of the lifecycle of an NonAdminBackup. diff --git a/config/crd/bases/oadp.openshift.io_nonadminrestores.yaml b/config/crd/bases/oadp.openshift.io_nonadminrestores.yaml index 4fc3a89095..8df02322eb 100644 --- a/config/crd/bases/oadp.openshift.io_nonadminrestores.yaml +++ b/config/crd/bases/oadp.openshift.io_nonadminrestores.yaml @@ -534,6 +534,72 @@ spec: - type type: object type: array + dataMoverVolumeRestores: + description: DataMoverVolumeRestores contains information of the related + Velero DataDownload objects. + properties: + accepted: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Accepted + type: integer + canceled: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Canceled + type: integer + canceling: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Canceling + type: integer + completed: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Completed + type: integer + failed: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Failed + type: integer + inProgress: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase InProgress + type: integer + new: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase New + type: integer + prepared: + description: number of DataDownloads related to this NonAdminRestore's + Restore in phase Prepared + type: integer + total: + description: number of DataDownloads related to this NonAdminRestore's + Restore + type: integer + type: object + fileSystemVolumeRestores: + description: FileSystemVolumeRestores contains information of the + related Velero PodVolumeRestore objects. + properties: + completed: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore in phase Completed + type: integer + failed: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore in phase Failed + type: integer + inProgress: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore in phase InProgress + type: integer + new: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore in phase New + type: integer + total: + description: number of PodVolumeRestores related to this NonAdminRestore's + Restore + type: integer + type: object phase: description: phase is a simple one high-level summary of the lifecycle of an NonAdminRestore. diff --git a/config/non-admin-controller_rbac/role.yaml b/config/non-admin-controller_rbac/role.yaml index 99b9a865a8..91db455e40 100644 --- a/config/non-admin-controller_rbac/role.yaml +++ b/config/non-admin-controller_rbac/role.yaml @@ -160,6 +160,22 @@ rules: - get - patch - update +- apiGroups: + - velero.io + resources: + - datadownloads + verbs: + - get + - list + - watch +- apiGroups: + - velero.io + resources: + - datauploads + verbs: + - get + - list + - watch - apiGroups: - velero.io resources: @@ -172,6 +188,22 @@ rules: - patch - update - watch +- apiGroups: + - velero.io + resources: + - podvolumebackups + verbs: + - get + - list + - watch +- apiGroups: + - velero.io + resources: + - podvolumerestores + verbs: + - get + - list + - watch - apiGroups: - velero.io resources: From 7843cca6af99e2adc99edb814c5cd87cf4d1d0f5 Mon Sep 17 00:00:00 2001 From: Mateus Oliveira Date: Mon, 3 Mar 2025 12:06:13 -0300 Subject: [PATCH 2/2] fixup! fix: Show backup/restore progress in NAB/NAR status Signed-off-by: Mateus Oliveira --- .../manifests/oadp.openshift.io_nonadminbackups.yaml | 10 +++++----- .../manifests/oadp.openshift.io_nonadminrestores.yaml | 8 ++++---- .../crd/bases/oadp.openshift.io_nonadminbackups.yaml | 10 +++++----- .../crd/bases/oadp.openshift.io_nonadminrestores.yaml | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/bundle/manifests/oadp.openshift.io_nonadminbackups.yaml b/bundle/manifests/oadp.openshift.io_nonadminbackups.yaml index c2a721bd7e..502280cff8 100644 --- a/bundle/manifests/oadp.openshift.io_nonadminbackups.yaml +++ b/bundle/manifests/oadp.openshift.io_nonadminbackups.yaml @@ -601,8 +601,8 @@ spec: - type type: object type: array - dataMoverVolumeBackups: - description: DataMoverVolumeBackups contains information of the related + dataMoverDataUploads: + description: DataMoverDataUploads contains information of the related Velero DataUpload objects. properties: accepted: @@ -642,9 +642,9 @@ spec: Backup type: integer type: object - fileSystemVolumeBackups: - description: FileSystemVolumeBackups contains information of the related - Velero PodVolumeBackup objects. + fileSystemPodVolumeBackups: + description: FileSystemPodVolumeBackups contains information of the + related Velero PodVolumeBackup objects. properties: completed: description: number of PodVolumeBackups related to this NonAdminBackup's diff --git a/bundle/manifests/oadp.openshift.io_nonadminrestores.yaml b/bundle/manifests/oadp.openshift.io_nonadminrestores.yaml index 3375ddcd50..49898c7dc9 100644 --- a/bundle/manifests/oadp.openshift.io_nonadminrestores.yaml +++ b/bundle/manifests/oadp.openshift.io_nonadminrestores.yaml @@ -534,8 +534,8 @@ spec: - type type: object type: array - dataMoverVolumeRestores: - description: DataMoverVolumeRestores contains information of the related + dataMoverDataDownloads: + description: DataMoverDataDownloads contains information of the related Velero DataDownload objects. properties: accepted: @@ -575,8 +575,8 @@ spec: Restore type: integer type: object - fileSystemVolumeRestores: - description: FileSystemVolumeRestores contains information of the + fileSystemPodVolumeRestores: + description: FileSystemPodVolumeRestores contains information of the related Velero PodVolumeRestore objects. properties: completed: diff --git a/config/crd/bases/oadp.openshift.io_nonadminbackups.yaml b/config/crd/bases/oadp.openshift.io_nonadminbackups.yaml index d1eae9750e..321bd31f59 100644 --- a/config/crd/bases/oadp.openshift.io_nonadminbackups.yaml +++ b/config/crd/bases/oadp.openshift.io_nonadminbackups.yaml @@ -601,8 +601,8 @@ spec: - type type: object type: array - dataMoverVolumeBackups: - description: DataMoverVolumeBackups contains information of the related + dataMoverDataUploads: + description: DataMoverDataUploads contains information of the related Velero DataUpload objects. properties: accepted: @@ -642,9 +642,9 @@ spec: Backup type: integer type: object - fileSystemVolumeBackups: - description: FileSystemVolumeBackups contains information of the related - Velero PodVolumeBackup objects. + fileSystemPodVolumeBackups: + description: FileSystemPodVolumeBackups contains information of the + related Velero PodVolumeBackup objects. properties: completed: description: number of PodVolumeBackups related to this NonAdminBackup's diff --git a/config/crd/bases/oadp.openshift.io_nonadminrestores.yaml b/config/crd/bases/oadp.openshift.io_nonadminrestores.yaml index 8df02322eb..26b3f116da 100644 --- a/config/crd/bases/oadp.openshift.io_nonadminrestores.yaml +++ b/config/crd/bases/oadp.openshift.io_nonadminrestores.yaml @@ -534,8 +534,8 @@ spec: - type type: object type: array - dataMoverVolumeRestores: - description: DataMoverVolumeRestores contains information of the related + dataMoverDataDownloads: + description: DataMoverDataDownloads contains information of the related Velero DataDownload objects. properties: accepted: @@ -575,8 +575,8 @@ spec: Restore type: integer type: object - fileSystemVolumeRestores: - description: FileSystemVolumeRestores contains information of the + fileSystemPodVolumeRestores: + description: FileSystemPodVolumeRestores contains information of the related Velero PodVolumeRestore objects. properties: completed: