-
Notifications
You must be signed in to change notification settings - Fork 263
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 --requests and --limits resource flags #859
Add --requests and --limits resource flags #859
Conversation
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.
@navidshaikh: 1 warning.
In response to this:
Description
- Add
--requests
and--limits
flags for service create and update- Deprecate
--requests-cpu
,--requests-memory
,--limits-cpu
and--limits-memory
flagsChanges
- Add
service create
example for using memory, CPU, GPU resources- Add error message if new and deprecated, requests and limits flags are used together
- Add warning message if deprecated flags are used
- Add unit and e2e tests, update existing unit tests
Reference
Fixes #490
/lint
Example:
GPU resource
$ kn service create hello-gpu-2 --image docker.io/mvinkler/hellocuda-go --limits nvidia.com/gpu=1 Creating service 'hello-gpu-2' in namespace 'default': 5.175s Configuration "hello-gpu-2" is waiting for a Revision to become ready. 5.299s Ingress has not yet been reconciled. 5.635s Ready to serve. Service 'hello-gpu-2' created to latest revision 'hello-gpu-2-qrcqg-1' is available at URL: http://hello-gpu-2-default.OOO $ curl http://hello-gpu-2-default.OOO cuda-vector-add output: [Vector addition of 50000 elements] Copy input data from the host memory to the CUDA device CUDA kernel launch with 196 blocks of 256 threads Copy output data from the CUDA device to the host memory Test PASSED Done
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
This pull request introduces 1 alert when merging f1a41f8 into 4ba1cca - view on LGTM.com new alerts:
|
/lint |
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.
@navidshaikh: 0 warnings.
In response to this:
/lint
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
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.
See comments.
/retest |
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.
looks good from my side.
Fixes knative#490 - Add deprecation message for --requests-cpu, --requests-memory, --limits-cpu and --limits-memory flag usage. - Add error message if new and deprecated, requests and limits flags are used together.
478d044
to
35071b9
Compare
35071b9
to
226d1fb
Compare
The following is the coverage report on the affected files.
|
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.
thanks !
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: navidshaikh, rhuss 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 |
knative#859) * Remove python http server from artifact image * Fix duplicate package install Co-authored-by: David Simansky <[email protected]>
Description
--requests
and--limits
flags for service create and update--requests-cpu
,--requests-memory
,--limits-cpu
and--limits-memory
flagsChanges
service create
example for using memory, CPU, GPU resourcesReference
Fixes #490
/lint
Example:
GPU resource