Skip to content

Commit

Permalink
Only perform quota checks if allocating resources
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph committed Dec 7, 2023
1 parent 45eb0ef commit 55ff0b2
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,19 @@ impl DoUpdate {
>(
not_allocted
.and(TrueOrCastError::new(
has_sufficient_cpus,
cpus_provisioned_delta.eq(0).or(has_sufficient_cpus),
NOT_ENOUGH_CPUS_SENTINEL,
))
.and(TrueOrCastError::new(
has_sufficient_memory,
memory_provisioned_delta
.eq(0)
.or(has_sufficient_memory),
NOT_ENOUGH_MEMORY_SENTINEL,
))
.and(TrueOrCastError::new(
has_sufficient_storage,
storage_provisioned_delta
.eq(0)
.or(has_sufficient_storage),
NOT_ENOUGH_STORAGE_SENTINEL,
)),
),))),
Expand Down

0 comments on commit 55ff0b2

Please sign in to comment.