Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
Signed-off-by: Tiger Kaovilai <[email protected]>
  • Loading branch information
kaovilai committed Feb 7, 2025
1 parent 12e0fd3 commit 2b16e0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/controller/nonadminbackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,13 +632,14 @@ func (r *NonAdminBackupReconciler) createVeleroBackupAndSyncWithNonAdminBackup(c
// Included Namespaces are set by the controller and can not be overridden by the user
// nor admin user
backupSpec.IncludedNamespaces = []string{nab.Namespace}
// If not empty, has to be a NaBSL, so override to a NaBSL with that name.
if backupSpec.StorageLocation != constant.EmptyString {
nonAdminBsl := &nacv1alpha1.NonAdminBackupStorageLocation{}

if nabslErr := r.Client.Get(ctx, types.NamespacedName{Name: backupSpec.StorageLocation, Namespace: nab.Namespace}, nonAdminBsl); nabslErr != nil {
return false, nabslErr
}
// Should there be a warning that we are overriding the user's storage location?

backupSpec.StorageLocation = nonAdminBsl.Status.VeleroBackupStorageLocation.Name
}

Expand Down

0 comments on commit 2b16e0d

Please sign in to comment.