Skip to content

feat: Add avalibale quota tip when edting project resource default quota

Created by: weili520

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

What type of PR is this?

/kind feature

What this PR does / why we need it:

The project resource default quota maximum should be the smallest of workspace lefted quota and namespace quota limit.

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

The workspace lcj-auto-quota's has two single cluster project in it: test2、lcj-test1. 
The quota of cluster rohan as follows:
   requests.cpu: 1 Core   requests.memory: 1 G
   limits.cpu: 4 Core     limits.cpu: 8 Core

the lcj-test1 project quota is: 
   request.cpu: 0.9 Core  reqests.memory: Not limit
   limits.cpu: Not limit  limits.cpu: 6.5 Core

so container default quota maximum is : 
   request.cpu: 0.9 Core  reqests.memory: 1 G
   limits.cpu: 4 Core     limits.cpu: 6.5 G

For multi cluster project, it also work on this, It will compares all cluster quota limit.

https://user-images.githubusercontent.com/33231138/142144509-e68985da-dff6-4dce-a0cc-8cc829a679f7.mov

Does this PR introduced a user-facing change?

Add avaliable quota tip when edting project resource default quota.

Additional documentation, usage docs, etc.:

合并请求报告

加载中