fix: Update container resource occupation validation strategy
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:
During creating a deployment, if the workspace or project has a quota limit, the container should also need to set resource limits, otherwise, we should give them an error tip.
For example, the project hello
's project quota limit is as follows:
requests.cpu: 1 core requests.memory: 2 Gi
limits.cpu: 2 core limits.memory: Not limited
and the container's default resource quota is:
requests.cpu: 1 core requests.memory: 1 Gi
limits.cpu: 4 core limits.memory: 4 Gi
so, if we don't update container's quota during creating deployment, the tip info should be this:
and then update it to:
requests.cpu: 1 core requests.memory: 1 Gi
limits.cpu: Not limited limits.memory: 4 Gi
Which issue(s) this PR fixes:
Fixes #
Special notes for reviewers:
Does this PR introduced a user-facing change?
Update container's resource occupation prompt during creating a deployment.