Skip to content

Commit

Permalink
change phase when quota exceeded
Browse files Browse the repository at this point in the history
Signed-off-by: Valeriy Khorunzhin <[email protected]>
  • Loading branch information
Valeriy Khorunzhin committed Jan 13, 2025
1 parent 9f6cd9b commit 37a12aa
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ func (ds HTTPDataSource) StoreToPVC(ctx context.Context, vi *virtv2.VirtualImage

return reconcile.Result{Requeue: true}, nil
case quotaNotExceededCondition != nil && quotaNotExceededCondition.Status == metav1.ConditionFalse:
vi.Status.Phase = virtv2.ImagePending
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.QuotaExceeded).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ func (ds ObjectRefDataSource) StoreToPVC(ctx context.Context, vi *virtv2.Virtual

return reconcile.Result{Requeue: true}, nil
case quotaNotExceededCondition != nil && quotaNotExceededCondition.Status == metav1.ConditionFalse:
vi.Status.Phase = virtv2.ImagePending
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.QuotaExceeded).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ func (ds ObjectRefVirtualDisk) StoreToPVC(ctx context.Context, vi *virtv2.Virtua

return reconcile.Result{Requeue: true}, nil
case quotaNotExceededCondition != nil && quotaNotExceededCondition.Status == metav1.ConditionFalse:
vi.Status.Phase = virtv2.ImagePending
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.QuotaExceeded).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ func (ds ObjectRefDataVirtualImageOnPVC) StoreToPVC(ctx context.Context, vi, viR

return reconcile.Result{Requeue: true}, nil
case quotaNotExceededCondition != nil && quotaNotExceededCondition.Status == metav1.ConditionFalse:
vi.Status.Phase = virtv2.ImagePending
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.QuotaExceeded).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ func (ds RegistryDataSource) StoreToPVC(ctx context.Context, vi *virtv2.VirtualI

return reconcile.Result{Requeue: true}, nil
case quotaNotExceededCondition != nil && quotaNotExceededCondition.Status == metav1.ConditionFalse:
vi.Status.Phase = virtv2.ImagePending
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.QuotaExceeded).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ func (ds UploadDataSource) StoreToPVC(ctx context.Context, vi *virtv2.VirtualIma

return reconcile.Result{Requeue: true}, nil
case quotaNotExceededCondition != nil && quotaNotExceededCondition.Status == metav1.ConditionFalse:
vi.Status.Phase = virtv2.ImagePending
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.QuotaExceeded).
Expand Down

0 comments on commit 37a12aa

Please sign in to comment.