Skip to content

opt: Update avaliable quotas tips when creating deployment

Created by: weili520

Signed-off-by: TheYoungManLi cjl@kubesphere.io

What type of PR is this?

/kind bug

What this PR does / why we need it:

At before, the available quota incrrect, it's the project left quota, if the project quota not config, the deployment available quota will be no limit. It should be the smallest one between project left quota and workspace left quota, multi cluster project project is also.

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

For the project test2(it blongs to lcj-auto-quota workspace, and it exist in rohan cluster):

In this workspace, rohan cluster available quota is:

  • requets.cpu: 0.01 core request.memory: 0.187 Gi limits.cpu: 0.56 core limits.memory: 4.979 Gi

截屏2021-11-25 23 44 17

for the project, the available quota is:

  • requets.cpu: 0 core request.memory: 0.005 Gi limits.cpu: no limit limits.memory: no limit

截屏2021-11-25 23 43 37

截屏2021-11-25 23 43 54

Does this PR introduced a user-facing change?

Update avaliable quotas tips when creating deployment.

Additional documentation, usage docs, etc.:

other: We need to optimize the available judagement when the available quota is 0 in the ResourceLimit component.

合并请求报告

加载中