Skip to content

Commit

Permalink
feat(backup): update k8s/crds.yaml
Browse files Browse the repository at this point in the history
ref: longhorn/longhorn 5411

Signed-off-by: James Lu <james.lu@suse.com>
  • Loading branch information
mantissahz committed Nov 7, 2024
1 parent b94fffb commit 48ed860
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions controller/volume_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3657,9 +3657,9 @@ func (c *VolumeController) getBackupVolumeInfo(v *longhorn.Volume) (string, stri
return "", "", "", errors.Wrapf(err, "failed to get backup %v for restoring volume %v", backupName, v.Name)
}

backupVolume, err := c.ds.GetBackupVolumeWithBackupTargetAndVolumeRO(backup.Spec.BackupTargetName, remoteBackupVolumeName)
backupVolume, err := c.ds.GetBackupVolumeWithBackupTargetAndVolumeRO(backup.Status.BackupTarget, remoteBackupVolumeName)
if err != nil {
return "", "", "", errors.Wrapf(err, "failed to get backup volume %v with backup target %v for restoring volume %v", remoteBackupVolumeName, backup.Spec.BackupTargetName, v.Name)
return "", "", "", errors.Wrapf(err, "failed to get backup volume %v with backup target %v for restoring volume %v", remoteBackupVolumeName, backup.Status.BackupTarget, v.Name)
}

return remoteBackupVolumeName, backupVolume.Name, backupName, nil
Expand Down
26 changes: 15 additions & 11 deletions k8s/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,9 @@ spec:
ownerID:
type: string
realSize:
description: Real size of image in bytes, which may be smaller than the size
when the file is a sparse file. Will be zero until known (e.g. while a backing image is uploading)
description: Real size of image in bytes, which may be smaller than
the size when the file is a sparse file. Will be zero until known
(e.g. while a backing image is uploading)
format: int64
type: integer
size:
Expand All @@ -574,8 +575,9 @@ spec:
uuid:
type: string
virtualSize:
description: Virtual size of image in bytes, which may be larger than physical
size. Will be zero until known (e.g. while a backing image is uploading)
description: Virtual size of image in bytes, which may be larger than
physical size. Will be zero until known (e.g. while a backing image
is uploading)
format: int64
type: integer
type: object
Expand Down Expand Up @@ -653,8 +655,9 @@ spec:
backing image backup
properties:
backingImage:
description: The backing image name..
nullable: true
description: |-
The backing image name.
Required
type: string
backupTargetName:
description: The backup target name.
Expand All @@ -677,6 +680,7 @@ spec:
Required
type: boolean
required:
- backingImage
- userCreated
type: object
status:
Expand Down Expand Up @@ -732,7 +736,8 @@ spec:
description: Record the secret if this backup backing image is encrypted
type: string
secretNamespace:
description: Record the secret namespace if this backup backing image is encrypted
description: Record the secret namespace if this backup backing image
is encrypted
type: string
size:
description: The backing image size.
Expand Down Expand Up @@ -878,6 +883,7 @@ spec:
- full
- incremental
- ""
type: string
backupTargetName:
description: The backup target name.
nullable: true
Expand Down Expand Up @@ -1119,9 +1125,6 @@ spec:
description: The interval that the cluster needs to run sync with
the backup target.
type: string
readOnly:
description: ReadOnly indicates if it can create a backup on the remote backup target or not.
type: boolean
syncRequestedAt:
description: The time to request run sync the remote backup target.
format: date-time
Expand Down Expand Up @@ -4214,7 +4217,8 @@ spec:
- gzip
type: string
backupTargetName:
description: 'The backup target name that the volume will be backed up to or is synced.'
description: The backup target name that the volume will be backed
up to or is synced.
type: string
dataEngine:
enum:
Expand Down

0 comments on commit 48ed860

Please sign in to comment.