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

Add suppport for cpuLimit, cpuRequest and memoryRequest #5252

Conversation

anandrkskd
Copy link
Contributor

@anandrkskd anandrkskd commented Nov 25, 2021

What type of PR is this?
/kind feature

What does this PR do / why we need it:
This PR adds feature to add cpuLimit, cpuRequest and memoryRequest values using devfile for a container
Which issue(s) this PR fixes:

Fixes #5132

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

 git clone https://github.com/openshift/nodejs-ex ; cd nodejs-ex
odo create nodejs --devfile ~/go/src/github.com/openshift/odo/tests/examples/source/devfiles/nodejs/devfile-with-MR-CL-CR.yaml
odo push
oc get pods podname -o jsonpath='{.spec.containers[0].resources}{"\n"}'

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Nov 25, 2021
@openshift-ci openshift-ci bot requested review from feloy and valaparthvi November 25, 2021 20:18
@netlify
Copy link

netlify bot commented Nov 25, 2021

✔️ Deploy Preview for odo-docusaurus-preview canceled.

🔨 Explore the source changes: aa90334

🔍 Inspect the deploy log: https://app.netlify.com/sites/odo-docusaurus-preview/deploys/61b05f24124afd00077a6329

@anandrkskd anandrkskd force-pushed the dev/update-devfile-api-2.1.0 branch from 5411f00 to 15c8e2e Compare November 25, 2021 20:26
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Nov 25, 2021
@anandrkskd anandrkskd changed the title Dev/update devfile api 2.1.0 Add suppport for cpuLimit, cpuRequest and memoryRequest Nov 26, 2021
@feloy
Copy link
Contributor

feloy commented Nov 26, 2021

@anandrkskd during the integration tests, we get the following errors:

[odo]  ✗  failed to parse the devfile /tmp/133431546/devfile.yaml, with error: invalid devfile schema. errors :
[odo] - components.2.volume: Additional property ephemeral is not allowed

It seems a problem similar to devfile/api#675

@feloy
Copy link
Contributor

feloy commented Nov 30, 2021

@anandrkskd , by downgrading to a previous commit of devfile/library, it seems that your PR will work.
You can try:

go get github.com/devfile/library@ab7bd9b8b615d75dbe99c414bd8d80f51894699d
go mod vendor

This is a commit just after the introduction of the new limits/requests, and before the change about the problematic ephemeral field. It is also before the changes of the GetRoute and GetIngress functions signatures, you will have to revert these changes.

@anandrkskd
Copy link
Contributor Author

Understood, will give it try ASAP.
Thanks, @feloy

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
38.8% 38.8% Duplication

@anandrkskd
Copy link
Contributor Author

/test psi-kubernetes-integration-e2e

@valaparthvi
Copy link
Contributor

Can you also take a look at the Sonar Cloud duplication report?

@feloy
Copy link
Contributor

feloy commented Dec 1, 2021

Kubernetes Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 1, 2021

Unit Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 1, 2021

Kubernetes Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 1, 2021

OpenShift Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 1, 2021

Unit Tests finished.
View logs: TXT HTML

@anandrkskd anandrkskd requested a review from feloy December 1, 2021 18:28
@anandrkskd
Copy link
Contributor Author

@feloy @valaparthvi can we move forward with lgtm and approve?

Copy link
Contributor

@valaparthvi valaparthvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about the nitty-gritty changes, but these are last few 🤞

@valaparthvi
Copy link
Contributor

Thank you for the changes!
/approve

@feloy
Copy link
Contributor

feloy commented Dec 2, 2021

Kubernetes Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 2, 2021

OpenShift Tests finished.
View logs: TXT HTML

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Dec 6, 2021
@anandrkskd anandrkskd force-pushed the dev/update-devfile-api-2.1.0 branch from 0dce90c to e333156 Compare December 8, 2021 06:53
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Dec 8, 2021
@feloy
Copy link
Contributor

feloy commented Dec 8, 2021

Kubernetes Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 8, 2021

OpenShift Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 8, 2021

Unit Tests finished.
View logs: TXT HTML

Signed-off-by: anandrkskd <[email protected]>
@feloy
Copy link
Contributor

feloy commented Dec 8, 2021

Kubernetes Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 8, 2021

Unit Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 8, 2021

OpenShift Tests finished.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Dec 8, 2021

/lgtm

Thanks for this work @anandrkskd

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Dec 8, 2021
@openshift-merge-robot openshift-merge-robot merged commit 0e42e99 into redhat-developer:main Dec 8, 2021
@dharmit dharmit added the kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation label Dec 21, 2021
@anandrkskd anandrkskd deleted the dev/update-devfile-api-2.1.0 branch October 13, 2022 11:10
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. Required by Prow. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support for cpuLimit, cpuRequest, memoryRequest
6 participants