Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Add suppport for cpuLimit, cpuRequest and memoryRequest - #5252

Merged
openshift-merge-robot merged 13 commits into
redhat-developer:mainfrom
anandrkskd:dev/update-devfile-api-2.1.0
Dec 8, 2021
Merged

openshift-merge-robot merged 13 commits into
redhat-developer:mainfrom
anandrkskd:dev/update-devfile-api-2.1.0

Conversation

@anandrkskd

@anandrkskd anandrkskd commented Nov 25, 2021 •

Copy link
Copy Markdown
Contributor

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

netlify Bot commented Nov 25, 2021 •

Copy link
Copy Markdown

✔️ 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

feloy commented Nov 26, 2021

Copy link
Copy Markdown
Contributor

@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

feloy commented Nov 30, 2021

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

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

@sonarqubecloud

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

/test psi-kubernetes-integration-e2e

Comment thread tests/integration/devfile/cmd_devfile_push_test.go Outdated
Comment thread tests/integration/devfile/cmd_devfile_push_test.go Outdated
Comment thread tests/integration/devfile/cmd_devfile_push_test.go
Comment thread tests/integration/devfile/cmd_devfile_push_test.go Outdated
@valaparthvi

Copy link
Copy Markdown
Contributor

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

@feloy

feloy commented Dec 1, 2021

Copy link
Copy Markdown
Contributor

Kubernetes Tests finished.
View logs: TXT HTML

Comment thread tests/integration/devfile/cmd_devfile_push_test.go Outdated
@feloy

feloy commented Dec 1, 2021

Copy link
Copy Markdown
Contributor

Unit Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 1, 2021

Copy link
Copy Markdown
Contributor

Kubernetes Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 1, 2021

Copy link
Copy Markdown
Contributor

OpenShift Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 1, 2021

Copy link
Copy Markdown
Contributor

Unit Tests finished.
View logs: TXT HTML

@anandrkskd
anandrkskd requested a review from feloy December 1, 2021 18:28
@anandrkskd

Copy link
Copy Markdown
Contributor Author

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

@valaparthvi valaparthvi left a comment

Copy link
Copy Markdown
Contributor

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 🤞

Comment thread tests/integration/devfile/cmd_devfile_push_test.go Outdated
Comment thread tests/integration/devfile/cmd_devfile_push_test.go
Comment thread tests/integration/devfile/cmd_devfile_push_test.go
@valaparthvi

Copy link
Copy Markdown
Contributor

Thank you for the changes!
/approve

@feloy

feloy commented Dec 2, 2021

Copy link
Copy Markdown
Contributor

Kubernetes Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 2, 2021

Copy link
Copy Markdown
Contributor

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
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
@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

feloy commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

Kubernetes Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

OpenShift Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

Unit Tests finished.
View logs: TXT HTML

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
@feloy

feloy commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

Kubernetes Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

Unit Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

OpenShift Tests finished.
View logs: TXT HTML

@feloy

feloy commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

/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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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