Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update container resource occupation validation strategy #2846

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

weili520
Copy link
Contributor

@weili520 weili520 commented Dec 14, 2021

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:

截屏2021-12-14 17 05 57

and then update it to:

requests.cpu: 1 core requests.memory: 1 Gi
limits.cpu: Not limited   limits.memory: 4 Gi

the tip should be as this:
截屏2021-12-14 17 10 01

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

2021-12-14.17.15.35.mov

Does this PR introduced a user-facing change?

Update container's resource occupation prompt during creating a deployment.

Additional documentation, usage docs, etc.:

Signed-off-by: TheYoungManLi <cjl@kubesphere.io>
@ks-ci-bot ks-ci-bot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 14, 2021
@weili520
Copy link
Contributor Author

/cc @liuyp2018 please take a look at this, thanks.

@harrisonliu5
Copy link
Contributor

/assign @xuliwenwenwen

@xuliwenwenwen
Copy link
Contributor

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 16, 2021
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: ca72d53e646e6b8cb6d3e436af84475917e71ae4

@harrisonliu5
Copy link
Contributor

/approve

@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harrisonliu5, weili520

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 20, 2021
@ks-ci-bot ks-ci-bot merged commit 358894c into kubesphere:master Dec 20, 2021
@weili520 weili520 deleted the info_tip branch December 24, 2021 06:44
Leioy pushed a commit to Leioy/console that referenced this pull request Sep 25, 2024
* fix: kubesphere/project#3040

* Fix: Remove log

---------

Co-authored-by: hollisy <jialeiyang@yunify.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants