Skip to content

Commit

Permalink
fix(vi): add size for image
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
  • Loading branch information
LopatinDmitr committed Sep 4, 2024
1 parent 37345aa commit 6cdf18e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ func (ds RegistryDataSource) StoreToPVC(ctx context.Context, vi *virtv2.VirtualI
condition.Message = ""

vi.Status.Progress = "100%"
vi.Status.Size = ds.statService.GetSize(pod)
vi.Status.DownloadSpeed = ds.statService.GetDownloadSpeed(vi.GetUID(), pod)
vi.Status.Target.PersistentVolumeClaim = dv.Status.ClaimName
default:
log.Info("Provisioning to PVC is in progress", "dvProgress", dv.Status.Progress, "dvPhase", dv.Status.Phase, "pvcPhase", pvc.Status.Phase)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ func (ds UploadDataSource) StoreToPVC(ctx context.Context, vi *virtv2.VirtualIma
condition.Message = ""

vi.Status.Progress = "100%"
vi.Status.Size = ds.statService.GetSize(pod)
vi.Status.DownloadSpeed = ds.statService.GetDownloadSpeed(vi.GetUID(), pod)
vi.Status.Target.PersistentVolumeClaim = dv.Status.ClaimName

log.Info("Ready", "vi", vi.Name, "progress", vi.Status.Progress, "dv.phase", dv.Status.Phase)
Expand Down

0 comments on commit 6cdf18e

Please sign in to comment.