fix: The quantity unit of the container group quota is incorrect
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:
Before, when users edit project resource quotas, if they set the key as counts/pods, so the value of limit can be set as '20G' and override the pods' limits., it is incorrect.
Which issue(s) this PR fixes:
Fixes ##2797 (closed)
Special notes for reviewers:
Does this PR introduced a user-facing change?
The unit of project resource quotas limit is incorrect.
Additional documentation, usage docs, etc.:
Now, if users set the key as one of the follows, the value only can be an integer:
limits.cpu
requests.cpu
limits.memory
requests.memory
-
count/pods
orpods
-
count/deployments.apps
ordeployments
-
count/statefulsets.apps
orstatefulsets
-
count/daemonsets.apps
ordaemonsets
-
count/jobs.batch
orjobs
-
count/cronjobs.batch
orcronjobs
persistentvolumeclaims
-
count/services
orservices
-
count/ingresses.extensions
orroutes
-
count/secrets
orsecrets
-
count/configmaps
orconfigmaps
For other keys, it will not restrict the type of input value.