mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-21 14:46:07 +00:00
allow individual backup storage locations to be read-only (#1517)
* allow individual backup storage locations to be read-only Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
committed by
Nolan Brubaker
parent
4e2e4cd5c4
commit
411d44a673
@@ -318,6 +318,11 @@ func (c *backupController) prepareBackupRequest(backup *velerov1api.Backup) *pkg
|
||||
}
|
||||
} else {
|
||||
request.StorageLocation = storageLocation
|
||||
|
||||
if request.StorageLocation.Spec.AccessMode == velerov1api.BackupStorageLocationAccessModeReadOnly {
|
||||
request.Status.ValidationErrors = append(request.Status.ValidationErrors,
|
||||
fmt.Sprintf("backup can't be created because backup storage location %s is currently in read-only mode", request.StorageLocation.Name))
|
||||
}
|
||||
}
|
||||
|
||||
// validate and get the backup's VolumeSnapshotLocations, and store the
|
||||
|
||||
Reference in New Issue
Block a user