Skip to content

fix: Update project available quota when editing project quota

Created by: weili520

What type of PR is this?

/kind bug

What this PR does / why we need it:

At before,the available quota is the workspace lefted quota, it is Incorrect,the project available quota should be the sum of workspace lefted quota and project used.

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

the workspace in shire cluster total quota is: limits.cpu: 2 Core limits.memory: 6G

the lcj-test-shire namespace total quota is: limits.cpu: 1 Core limits.memory: 2G

the workload that we created quota is: limits.cpu: 0.5 Core limits.memory: 1G

https://user-images.githubusercontent.com/33231138/141942391-b61b01ef-6f09-4378-97ab-a87c0cdb737d.mov

At before, if we create a workload as the video shown, the available quota as follows: 截屏2021-11-16 15 46 35

Does this PR introduced a user-facing change?

Project avaliable quota inccrect. It should be the sum of workspace remaining quota and project used quota. 

Additional documentation, usage docs, etc.:

合并请求报告

加载中