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 e3da7fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/nonadminbackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,13 +632,13 @@ 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 e3da7fb

Please sign in to comment.