-
Notifications
You must be signed in to change notification settings - Fork 35
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 more resource requirement in generator #119
Conversation
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
pkg/devfile/generator/utils.go
Outdated
if comp.Container != nil { | ||
if comp.Container.MemoryLimit != "" { | ||
memoryLimit, err := resource.ParseQuantity(comp.Container.MemoryLimit) | ||
if err == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we issue an error message if ParseQuantity fails? The field will not be set in that case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. updated
pkg/devfile/generator/utils.go
Outdated
requests[corev1.ResourceMemory] = memoryRequest | ||
} | ||
} | ||
if comp.Container.CpuLimit != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should check for Container.CpuRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Signed-off-by: Stephanie <[email protected]>
26d36e8
to
fd79c14
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kim-tsao, yangcao77 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 |
Signed-off-by: Stephanie [email protected]
What does this PR do?:
This PR adds additional resource requirements from spec in generator. Also modifies unit test accordingly
Which issue(s) this PR fixes:
Fixes devfile/api#641
PR acceptance criteria:
Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened.
Unit/Functional tests
QE Integration test
Documentation
Client Impact
How to test changes / Special notes to the reviewer: